diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AccountClient.AccountGet.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AccountClient.AccountGet.g.cs index c1139f2..93045c2 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AccountClient.AccountGet.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AccountClient.AccountGet.g.cs @@ -178,7 +178,7 @@ partial void ProcessAccountGetResponseContent( pathTemplate: "\"/account\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -212,7 +212,7 @@ partial void ProcessAccountGetResponseContent( pathTemplate: "\"/account\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -253,7 +253,7 @@ partial void ProcessAccountGetResponseContent( pathTemplate: "\"/account\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -301,7 +301,7 @@ partial void ProcessAccountGetResponseContent( pathTemplate: "\"/account\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -323,7 +323,7 @@ partial void ProcessAccountGetResponseContent( pathTemplate: "\"/account\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsCreate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsCreate.g.cs index bb36c2a..b8e7213 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsCreate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsCreate.g.cs @@ -198,7 +198,7 @@ partial void ProcessActionsCreateResponseContent( pathTemplate: "\"/actions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -232,7 +232,7 @@ partial void ProcessActionsCreateResponseContent( pathTemplate: "\"/actions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -273,7 +273,7 @@ partial void ProcessActionsCreateResponseContent( pathTemplate: "\"/actions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -321,7 +321,7 @@ partial void ProcessActionsCreateResponseContent( pathTemplate: "\"/actions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -343,7 +343,7 @@ partial void ProcessActionsCreateResponseContent( pathTemplate: "\"/actions\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsDelete.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsDelete.g.cs index 352b08a..ddb591d 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsDelete.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsDelete.g.cs @@ -169,7 +169,7 @@ partial void ProcessActionsDeleteResponseContent( PrepareActionsDeleteRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessActionsDeleteResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessActionsDeleteResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessActionsDeleteResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessActionsDeleteResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessActionsDeleteResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsExecute.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsExecute.g.cs index 5321af9..663c109 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsExecute.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsExecute.g.cs @@ -198,7 +198,7 @@ partial void ProcessActionsExecuteResponseContent( pathTemplate: "\"/actions/execute\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -232,7 +232,7 @@ partial void ProcessActionsExecuteResponseContent( pathTemplate: "\"/actions/execute\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -273,7 +273,7 @@ partial void ProcessActionsExecuteResponseContent( pathTemplate: "\"/actions/execute\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -321,7 +321,7 @@ partial void ProcessActionsExecuteResponseContent( pathTemplate: "\"/actions/execute\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -343,7 +343,7 @@ partial void ProcessActionsExecuteResponseContent( pathTemplate: "\"/actions/execute\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsGet.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsGet.g.cs index e7f2784..71b8c1c 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsGet.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsGet.g.cs @@ -169,7 +169,7 @@ partial void ProcessActionsGetResponseContent( PrepareActionsGetRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessActionsGetResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessActionsGetResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessActionsGetResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessActionsGetResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessActionsGetResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsList.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsList.g.cs index 5e0dc43..24f0c5d 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsList.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsList.g.cs @@ -190,7 +190,7 @@ partial void ProcessActionsListResponseContent( pathTemplate: "\"/actions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -224,7 +224,7 @@ partial void ProcessActionsListResponseContent( pathTemplate: "\"/actions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -265,7 +265,7 @@ partial void ProcessActionsListResponseContent( pathTemplate: "\"/actions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -313,7 +313,7 @@ partial void ProcessActionsListResponseContent( pathTemplate: "\"/actions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -335,7 +335,7 @@ partial void ProcessActionsListResponseContent( pathTemplate: "\"/actions\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsUpdate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsUpdate.g.cs index 51c6084..346aa59 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsUpdate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ActionsClient.ActionsUpdate.g.cs @@ -188,7 +188,7 @@ partial void ProcessActionsUpdateResponseContent( PrepareActionsUpdateRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); return __httpRequest; @@ -211,7 +211,7 @@ partial void ProcessActionsUpdateResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -245,7 +245,7 @@ partial void ProcessActionsUpdateResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -286,7 +286,7 @@ partial void ProcessActionsUpdateResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -334,7 +334,7 @@ partial void ProcessActionsUpdateResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -356,7 +356,7 @@ partial void ProcessActionsUpdateResponseContent( pathTemplate: "$\"/actions/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AllOf.2.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AllOf.2.g.cs index 015bc0d..7667ba9 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AllOf.2.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AllOf.2.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// @@ -190,13 +190,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } return default(TResult); @@ -216,13 +216,13 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } } @@ -239,13 +239,13 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AnyOf.3.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AnyOf.3.g.cs index 173bcd0..1a31260 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AnyOf.3.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AnyOf.3.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// @@ -115,8 +115,8 @@ public bool TryPickValue3( /// /// /// - public T3 PickValue3() => IsValue3 - ? Value3! + public T3 PickValue3() => Value3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value3' but the value was {ToString()}."); /// /// @@ -241,17 +241,17 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } - else if (IsValue3 && value3 != null) + else if (Value3 is { } __value2 && value3 != null) { - return value3(Value3!); + return value3(__value2); } return default(TResult); @@ -273,17 +273,17 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } } @@ -301,17 +301,17 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorDelete.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorDelete.g.cs index 53ca05a..561ad5e 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorDelete.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorDelete.g.cs @@ -165,7 +165,7 @@ partial void ProcessAuthorDeleteResponseContent( PrepareAuthorDeleteRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -187,7 +187,7 @@ partial void ProcessAuthorDeleteResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -221,7 +221,7 @@ partial void ProcessAuthorDeleteResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -262,7 +262,7 @@ partial void ProcessAuthorDeleteResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -310,7 +310,7 @@ partial void ProcessAuthorDeleteResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -332,7 +332,7 @@ partial void ProcessAuthorDeleteResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenCreate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenCreate.g.cs index 25cf55c..f24cd1d 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenCreate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenCreate.g.cs @@ -198,7 +198,7 @@ partial void ProcessAuthorOpenCreateResponseContent( pathTemplate: "\"/authors\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -232,7 +232,7 @@ partial void ProcessAuthorOpenCreateResponseContent( pathTemplate: "\"/authors\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -273,7 +273,7 @@ partial void ProcessAuthorOpenCreateResponseContent( pathTemplate: "\"/authors\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -321,7 +321,7 @@ partial void ProcessAuthorOpenCreateResponseContent( pathTemplate: "\"/authors\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -343,7 +343,7 @@ partial void ProcessAuthorOpenCreateResponseContent( pathTemplate: "\"/authors\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenGetAuthorDetails.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenGetAuthorDetails.g.cs index e967811..c898d83 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenGetAuthorDetails.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenGetAuthorDetails.g.cs @@ -169,7 +169,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( PrepareAuthorOpenGetAuthorDetailsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessAuthorOpenGetAuthorDetailsResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenListAuthors.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenListAuthors.g.cs index 5f065d6..d520f69 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenListAuthors.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenListAuthors.g.cs @@ -268,7 +268,7 @@ partial void ProcessAuthorOpenListAuthorsResponseContent( pathTemplate: "\"/authors\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -302,7 +302,7 @@ partial void ProcessAuthorOpenListAuthorsResponseContent( pathTemplate: "\"/authors\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -343,7 +343,7 @@ partial void ProcessAuthorOpenListAuthorsResponseContent( pathTemplate: "\"/authors\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -391,7 +391,7 @@ partial void ProcessAuthorOpenListAuthorsResponseContent( pathTemplate: "\"/authors\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -413,7 +413,7 @@ partial void ProcessAuthorOpenListAuthorsResponseContent( pathTemplate: "\"/authors\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenUpdate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenUpdate.g.cs index eacf770..c244675 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenUpdate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AuthorClient.AuthorOpenUpdate.g.cs @@ -188,7 +188,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( PrepareAuthorOpenUpdateRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); return __httpRequest; @@ -211,7 +211,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -245,7 +245,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -286,7 +286,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -334,7 +334,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -356,7 +356,7 @@ partial void ProcessAuthorOpenUpdateResponseContent( pathTemplate: "$\"/authors/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.AutoSDKHttpResponse.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.AutoSDKHttpResponse.g.cs index da19630..f7d7a2d 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.AutoSDKHttpResponse.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.AutoSDKHttpResponse.g.cs @@ -164,9 +164,9 @@ public static class AutoSDKConditionalRequests { send = send ?? throw new global::System.ArgumentNullException(nameof(send)); requestOptions = CloneRequestOptions(requestOptions); - if (!string.IsNullOrWhiteSpace(entityTag)) + if (entityTag is { } nonEmptyEntityTag && !string.IsNullOrWhiteSpace(nonEmptyEntityTag)) { - requestOptions.Headers["If-None-Match"] = entityTag!; + requestOptions.Headers["If-None-Match"] = nonEmptyEntityTag; } try diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AllOf2.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AllOf2.g.cs index ee66b2c..619f443 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AllOf2.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AllOf2.g.cs @@ -69,7 +69,7 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Value1!, typeInfo); + var __element0 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickValue1(), typeInfo); if (__element0.ValueKind != global::System.Text.Json.JsonValueKind.Object) { throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); @@ -87,7 +87,7 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.Value2!, typeInfo); + var __element1 = global::System.Text.Json.JsonSerializer.SerializeToElement(value.PickValue2(), typeInfo); if (__element1.ValueKind != global::System.Text.Json.JsonValueKind.Object) { throw new global::System.Text.Json.JsonException("AllOf values must serialize as JSON objects."); diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AnyOf3.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AnyOf3.g.cs index 534a315..ab09412 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AnyOf3.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.AnyOf3.g.cs @@ -197,19 +197,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); } else if (value.IsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); } else if (value.IsValue3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue3(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamRequest.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamRequest.g.cs index 90ec5d1..448d8c3 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamRequest.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamRequest.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceStartFrame), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceStartFrame).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Start!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickStart(), typeInfo); } else if (value.IsMedia) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceMediaFrame), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceMediaFrame).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Media!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickMedia(), typeInfo); } else if (value.IsStop) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceStopFrame), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceStopFrame).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Stop!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickStop(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamResponse.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamResponse.g.cs index a234c50..e32f415 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamResponse.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.GetStreamResponse.g.cs @@ -68,19 +68,19 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceSessionStarted), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceSessionStarted).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SessionStarted!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSessionStarted(), typeInfo); } else if (value.IsUtteranceFinal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceUtteranceFinal), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceUtteranceFinal).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UtteranceFinal!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickUtteranceFinal(), typeInfo); } else if (value.IsSessionEnded) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.VoiceSessionEnded), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.VoiceSessionEnded).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SessionEnded!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickSessionEnded(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf2.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf2.g.cs index bb28aec..1b399b3 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf2.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf2.g.cs @@ -148,13 +148,13 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); } else if (value.IsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf29.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf29.g.cs index 23d2496..d12993a 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf29.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf29.g.cs @@ -1471,175 +1471,175 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); } else if (value.IsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); } else if (value.IsValue3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue3(), typeInfo); } else if (value.IsValue4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue4(), typeInfo); } else if (value.IsValue5) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue5(), typeInfo); } else if (value.IsValue6) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue6(), typeInfo); } else if (value.IsValue7) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue7(), typeInfo); } else if (value.IsValue8) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue8(), typeInfo); } else if (value.IsValue9) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue9(), typeInfo); } else if (value.IsValue10) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value10!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue10(), typeInfo); } else if (value.IsValue11) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value11!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue11(), typeInfo); } else if (value.IsValue12) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value12!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue12(), typeInfo); } else if (value.IsValue13) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value13!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue13(), typeInfo); } else if (value.IsValue14) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value14!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue14(), typeInfo); } else if (value.IsValue15) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value15!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue15(), typeInfo); } else if (value.IsValue16) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value16!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue16(), typeInfo); } else if (value.IsValue17) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value17!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue17(), typeInfo); } else if (value.IsValue18) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T18).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value18!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue18(), typeInfo); } else if (value.IsValue19) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T19).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value19!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue19(), typeInfo); } else if (value.IsValue20) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T20).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value20!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue20(), typeInfo); } else if (value.IsValue21) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T21).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value21!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue21(), typeInfo); } else if (value.IsValue22) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T22).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value22!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue22(), typeInfo); } else if (value.IsValue23) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T23).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value23!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue23(), typeInfo); } else if (value.IsValue24) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T24).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value24!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue24(), typeInfo); } else if (value.IsValue25) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T25).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value25!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue25(), typeInfo); } else if (value.IsValue26) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T26), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T26).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value26!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue26(), typeInfo); } else if (value.IsValue27) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T27), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T27).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value27!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue27(), typeInfo); } else if (value.IsValue28) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T28), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T28).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value28!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue28(), typeInfo); } else if (value.IsValue29) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T29), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T29).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value29!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue29(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf4.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf4.g.cs index 6be8bf6..a0751d2 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf4.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf4.g.cs @@ -246,25 +246,25 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); } else if (value.IsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); } else if (value.IsValue3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue3(), typeInfo); } else if (value.IsValue4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue4(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf5.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf5.g.cs index 9bfd6de..b0e84a6 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf5.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.OneOf5.g.cs @@ -295,31 +295,31 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue1(), typeInfo); } else if (value.IsValue2) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue2(), typeInfo); } else if (value.IsValue3) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue3(), typeInfo); } else if (value.IsValue4) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue4(), typeInfo); } else if (value.IsValue5) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(T5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(T5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickValue5(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.WebhookEvent.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.WebhookEvent.g.cs index 943af5b..badef1f 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.WebhookEvent.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.JsonConverters.WebhookEvent.g.cs @@ -131,61 +131,61 @@ public override void Write( { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorBlockedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorBlockedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorBlocked!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorBlocked(), typeInfo); } else if (value.IsAuthorUnblocked) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorUnblockedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorUnblockedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorUnblocked!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorUnblocked(), typeInfo); } else if (value.IsAuthorSuspended) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorSuspendedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorSuspendedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorSuspended!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorSuspended(), typeInfo); } else if (value.IsAuthorUpdated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorUpdatedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorUpdatedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorUpdated!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorUpdated(), typeInfo); } else if (value.IsAuthorTrustLevelChanged) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorTrustLevelChangedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorTrustLevelChangedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorTrustLevelChanged!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorTrustLevelChanged(), typeInfo); } else if (value.IsAuthorAction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.AuthorActionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.AuthorActionEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AuthorAction!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickAuthorAction(), typeInfo); } else if (value.IsQueueItemResolved) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.QueueItemCompletedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.QueueItemCompletedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueueItemResolved!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickQueueItemResolved(), typeInfo); } else if (value.IsQueueItemAction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.QueueItemActionEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.QueueItemActionEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueueItemAction!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickQueueItemAction(), typeInfo); } else if (value.IsQueueItemRejected) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.QueueItemRejectedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.QueueItemRejectedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueueItemRejected!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickQueueItemRejected(), typeInfo); } else if (value.IsQueueItemAllowed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::ModerationAPI.QueueItemAllowedEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::ModerationAPI.QueueItemAllowedEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.QueueItemAllowed!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PickQueueItemAllowed(), typeInfo); } } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamRequest.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamRequest.g.cs index 42236a9..7298c64 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamRequest.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamRequest.g.cs @@ -47,8 +47,8 @@ public bool TryPickStart( /// /// /// - public global::ModerationAPI.VoiceStartFrame PickStart() => IsStart - ? Start! + public global::ModerationAPI.VoiceStartFrame PickStart() => Start is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Start' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickMedia( /// /// /// - public global::ModerationAPI.VoiceMediaFrame PickMedia() => IsMedia - ? Media! + public global::ModerationAPI.VoiceMediaFrame PickMedia() => Media is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Media' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickStop( /// /// /// - public global::ModerationAPI.VoiceStopFrame PickStop() => IsStop - ? Stop! + public global::ModerationAPI.VoiceStopFrame PickStop() => Stop is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Stop' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsStart && start != null) + if (Start is { } __value0 && start != null) { - return start(Start!); + return start(__value0); } - else if (IsMedia && media != null) + else if (Media is { } __value1 && media != null) { - return media(Media!); + return media(__value1); } - else if (IsStop && stop != null) + else if (Stop is { } __value2 && stop != null) { - return stop(Stop!); + return stop(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsStart) + if (Start is { } __value0) { - start?.Invoke(Start!); + start?.Invoke(__value0); } - else if (IsMedia) + else if (Media is { } __value1) { - media?.Invoke(Media!); + media?.Invoke(__value1); } - else if (IsStop) + else if (Stop is { } __value2) { - stop?.Invoke(Stop!); + stop?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsStart) + if (Start is { } __value0) { - start?.Invoke(Start!); + start?.Invoke(__value0); } - else if (IsMedia) + else if (Media is { } __value1) { - media?.Invoke(Media!); + media?.Invoke(__value1); } - else if (IsStop) + else if (Stop is { } __value2) { - stop?.Invoke(Stop!); + stop?.Invoke(__value2); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamResponse.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamResponse.g.cs index d19cfd1..939c110 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamResponse.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.GetStreamResponse.g.cs @@ -47,8 +47,8 @@ public bool TryPickSessionStarted( /// /// /// - public global::ModerationAPI.VoiceSessionStarted PickSessionStarted() => IsSessionStarted - ? SessionStarted! + public global::ModerationAPI.VoiceSessionStarted PickSessionStarted() => SessionStarted is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SessionStarted' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickUtteranceFinal( /// /// /// - public global::ModerationAPI.VoiceUtteranceFinal PickUtteranceFinal() => IsUtteranceFinal - ? UtteranceFinal! + public global::ModerationAPI.VoiceUtteranceFinal PickUtteranceFinal() => UtteranceFinal is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'UtteranceFinal' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickSessionEnded( /// /// /// - public global::ModerationAPI.VoiceSessionEnded PickSessionEnded() => IsSessionEnded - ? SessionEnded! + public global::ModerationAPI.VoiceSessionEnded PickSessionEnded() => SessionEnded is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'SessionEnded' but the value was {ToString()}."); /// /// @@ -250,17 +250,17 @@ public bool Validate() Validate(); } - if (IsSessionStarted && sessionStarted != null) + if (SessionStarted is { } __value0 && sessionStarted != null) { - return sessionStarted(SessionStarted!); + return sessionStarted(__value0); } - else if (IsUtteranceFinal && utteranceFinal != null) + else if (UtteranceFinal is { } __value1 && utteranceFinal != null) { - return utteranceFinal(UtteranceFinal!); + return utteranceFinal(__value1); } - else if (IsSessionEnded && sessionEnded != null) + else if (SessionEnded is { } __value2 && sessionEnded != null) { - return sessionEnded(SessionEnded!); + return sessionEnded(__value2); } return default(TResult); @@ -282,17 +282,17 @@ public void Match( Validate(); } - if (IsSessionStarted) + if (SessionStarted is { } __value0) { - sessionStarted?.Invoke(SessionStarted!); + sessionStarted?.Invoke(__value0); } - else if (IsUtteranceFinal) + else if (UtteranceFinal is { } __value1) { - utteranceFinal?.Invoke(UtteranceFinal!); + utteranceFinal?.Invoke(__value1); } - else if (IsSessionEnded) + else if (SessionEnded is { } __value2) { - sessionEnded?.Invoke(SessionEnded!); + sessionEnded?.Invoke(__value2); } } @@ -310,17 +310,17 @@ public void Switch( Validate(); } - if (IsSessionStarted) + if (SessionStarted is { } __value0) { - sessionStarted?.Invoke(SessionStarted!); + sessionStarted?.Invoke(__value0); } - else if (IsUtteranceFinal) + else if (UtteranceFinal is { } __value1) { - utteranceFinal?.Invoke(UtteranceFinal!); + utteranceFinal?.Invoke(__value1); } - else if (IsSessionEnded) + else if (SessionEnded is { } __value2) { - sessionEnded?.Invoke(SessionEnded!); + sessionEnded?.Invoke(__value2); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.WebhookEvent.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.WebhookEvent.g.cs index 0dff397..3e81f6a 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.Models.WebhookEvent.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.Models.WebhookEvent.g.cs @@ -47,8 +47,8 @@ public bool TryPickAuthorBlocked( /// /// /// - public global::ModerationAPI.AuthorBlockedEvent PickAuthorBlocked() => IsAuthorBlocked - ? AuthorBlocked! + public global::ModerationAPI.AuthorBlockedEvent PickAuthorBlocked() => AuthorBlocked is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorBlocked' but the value was {ToString()}."); /// @@ -84,8 +84,8 @@ public bool TryPickAuthorUnblocked( /// /// /// - public global::ModerationAPI.AuthorUnblockedEvent PickAuthorUnblocked() => IsAuthorUnblocked - ? AuthorUnblocked! + public global::ModerationAPI.AuthorUnblockedEvent PickAuthorUnblocked() => AuthorUnblocked is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorUnblocked' but the value was {ToString()}."); /// @@ -121,8 +121,8 @@ public bool TryPickAuthorSuspended( /// /// /// - public global::ModerationAPI.AuthorSuspendedEvent PickAuthorSuspended() => IsAuthorSuspended - ? AuthorSuspended! + public global::ModerationAPI.AuthorSuspendedEvent PickAuthorSuspended() => AuthorSuspended is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorSuspended' but the value was {ToString()}."); /// @@ -158,8 +158,8 @@ public bool TryPickAuthorUpdated( /// /// /// - public global::ModerationAPI.AuthorUpdatedEvent PickAuthorUpdated() => IsAuthorUpdated - ? AuthorUpdated! + public global::ModerationAPI.AuthorUpdatedEvent PickAuthorUpdated() => AuthorUpdated is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorUpdated' but the value was {ToString()}."); /// @@ -195,8 +195,8 @@ public bool TryPickAuthorTrustLevelChanged( /// /// /// - public global::ModerationAPI.AuthorTrustLevelChangedEvent PickAuthorTrustLevelChanged() => IsAuthorTrustLevelChanged - ? AuthorTrustLevelChanged! + public global::ModerationAPI.AuthorTrustLevelChangedEvent PickAuthorTrustLevelChanged() => AuthorTrustLevelChanged is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorTrustLevelChanged' but the value was {ToString()}."); /// @@ -232,8 +232,8 @@ public bool TryPickAuthorAction( /// /// /// - public global::ModerationAPI.AuthorActionEvent PickAuthorAction() => IsAuthorAction - ? AuthorAction! + public global::ModerationAPI.AuthorActionEvent PickAuthorAction() => AuthorAction is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'AuthorAction' but the value was {ToString()}."); /// @@ -269,8 +269,8 @@ public bool TryPickQueueItemResolved( /// /// /// - public global::ModerationAPI.QueueItemCompletedEvent PickQueueItemResolved() => IsQueueItemResolved - ? QueueItemResolved! + public global::ModerationAPI.QueueItemCompletedEvent PickQueueItemResolved() => QueueItemResolved is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'QueueItemResolved' but the value was {ToString()}."); /// @@ -306,8 +306,8 @@ public bool TryPickQueueItemAction( /// /// /// - public global::ModerationAPI.QueueItemActionEvent PickQueueItemAction() => IsQueueItemAction - ? QueueItemAction! + public global::ModerationAPI.QueueItemActionEvent PickQueueItemAction() => QueueItemAction is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'QueueItemAction' but the value was {ToString()}."); /// @@ -343,8 +343,8 @@ public bool TryPickQueueItemRejected( /// /// /// - public global::ModerationAPI.QueueItemRejectedEvent PickQueueItemRejected() => IsQueueItemRejected - ? QueueItemRejected! + public global::ModerationAPI.QueueItemRejectedEvent PickQueueItemRejected() => QueueItemRejected is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'QueueItemRejected' but the value was {ToString()}."); /// @@ -380,8 +380,8 @@ public bool TryPickQueueItemAllowed( /// /// /// - public global::ModerationAPI.QueueItemAllowedEvent PickQueueItemAllowed() => IsQueueItemAllowed - ? QueueItemAllowed! + public global::ModerationAPI.QueueItemAllowedEvent PickQueueItemAllowed() => QueueItemAllowed is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'QueueItemAllowed' but the value was {ToString()}."); /// /// @@ -705,45 +705,45 @@ public bool Validate() Validate(); } - if (IsAuthorBlocked && authorBlocked != null) + if (AuthorBlocked is { } __value0 && authorBlocked != null) { - return authorBlocked(AuthorBlocked!); + return authorBlocked(__value0); } - else if (IsAuthorUnblocked && authorUnblocked != null) + else if (AuthorUnblocked is { } __value1 && authorUnblocked != null) { - return authorUnblocked(AuthorUnblocked!); + return authorUnblocked(__value1); } - else if (IsAuthorSuspended && authorSuspended != null) + else if (AuthorSuspended is { } __value2 && authorSuspended != null) { - return authorSuspended(AuthorSuspended!); + return authorSuspended(__value2); } - else if (IsAuthorUpdated && authorUpdated != null) + else if (AuthorUpdated is { } __value3 && authorUpdated != null) { - return authorUpdated(AuthorUpdated!); + return authorUpdated(__value3); } - else if (IsAuthorTrustLevelChanged && authorTrustLevelChanged != null) + else if (AuthorTrustLevelChanged is { } __value4 && authorTrustLevelChanged != null) { - return authorTrustLevelChanged(AuthorTrustLevelChanged!); + return authorTrustLevelChanged(__value4); } - else if (IsAuthorAction && authorAction != null) + else if (AuthorAction is { } __value5 && authorAction != null) { - return authorAction(AuthorAction!); + return authorAction(__value5); } - else if (IsQueueItemResolved && queueItemResolved != null) + else if (QueueItemResolved is { } __value6 && queueItemResolved != null) { - return queueItemResolved(QueueItemResolved!); + return queueItemResolved(__value6); } - else if (IsQueueItemAction && queueItemAction != null) + else if (QueueItemAction is { } __value7 && queueItemAction != null) { - return queueItemAction(QueueItemAction!); + return queueItemAction(__value7); } - else if (IsQueueItemRejected && queueItemRejected != null) + else if (QueueItemRejected is { } __value8 && queueItemRejected != null) { - return queueItemRejected(QueueItemRejected!); + return queueItemRejected(__value8); } - else if (IsQueueItemAllowed && queueItemAllowed != null) + else if (QueueItemAllowed is { } __value9 && queueItemAllowed != null) { - return queueItemAllowed(QueueItemAllowed!); + return queueItemAllowed(__value9); } return default(TResult); @@ -779,45 +779,45 @@ public void Match( Validate(); } - if (IsAuthorBlocked) + if (AuthorBlocked is { } __value0) { - authorBlocked?.Invoke(AuthorBlocked!); + authorBlocked?.Invoke(__value0); } - else if (IsAuthorUnblocked) + else if (AuthorUnblocked is { } __value1) { - authorUnblocked?.Invoke(AuthorUnblocked!); + authorUnblocked?.Invoke(__value1); } - else if (IsAuthorSuspended) + else if (AuthorSuspended is { } __value2) { - authorSuspended?.Invoke(AuthorSuspended!); + authorSuspended?.Invoke(__value2); } - else if (IsAuthorUpdated) + else if (AuthorUpdated is { } __value3) { - authorUpdated?.Invoke(AuthorUpdated!); + authorUpdated?.Invoke(__value3); } - else if (IsAuthorTrustLevelChanged) + else if (AuthorTrustLevelChanged is { } __value4) { - authorTrustLevelChanged?.Invoke(AuthorTrustLevelChanged!); + authorTrustLevelChanged?.Invoke(__value4); } - else if (IsAuthorAction) + else if (AuthorAction is { } __value5) { - authorAction?.Invoke(AuthorAction!); + authorAction?.Invoke(__value5); } - else if (IsQueueItemResolved) + else if (QueueItemResolved is { } __value6) { - queueItemResolved?.Invoke(QueueItemResolved!); + queueItemResolved?.Invoke(__value6); } - else if (IsQueueItemAction) + else if (QueueItemAction is { } __value7) { - queueItemAction?.Invoke(QueueItemAction!); + queueItemAction?.Invoke(__value7); } - else if (IsQueueItemRejected) + else if (QueueItemRejected is { } __value8) { - queueItemRejected?.Invoke(QueueItemRejected!); + queueItemRejected?.Invoke(__value8); } - else if (IsQueueItemAllowed) + else if (QueueItemAllowed is { } __value9) { - queueItemAllowed?.Invoke(QueueItemAllowed!); + queueItemAllowed?.Invoke(__value9); } } @@ -842,45 +842,45 @@ public void Switch( Validate(); } - if (IsAuthorBlocked) + if (AuthorBlocked is { } __value0) { - authorBlocked?.Invoke(AuthorBlocked!); + authorBlocked?.Invoke(__value0); } - else if (IsAuthorUnblocked) + else if (AuthorUnblocked is { } __value1) { - authorUnblocked?.Invoke(AuthorUnblocked!); + authorUnblocked?.Invoke(__value1); } - else if (IsAuthorSuspended) + else if (AuthorSuspended is { } __value2) { - authorSuspended?.Invoke(AuthorSuspended!); + authorSuspended?.Invoke(__value2); } - else if (IsAuthorUpdated) + else if (AuthorUpdated is { } __value3) { - authorUpdated?.Invoke(AuthorUpdated!); + authorUpdated?.Invoke(__value3); } - else if (IsAuthorTrustLevelChanged) + else if (AuthorTrustLevelChanged is { } __value4) { - authorTrustLevelChanged?.Invoke(AuthorTrustLevelChanged!); + authorTrustLevelChanged?.Invoke(__value4); } - else if (IsAuthorAction) + else if (AuthorAction is { } __value5) { - authorAction?.Invoke(AuthorAction!); + authorAction?.Invoke(__value5); } - else if (IsQueueItemResolved) + else if (QueueItemResolved is { } __value6) { - queueItemResolved?.Invoke(QueueItemResolved!); + queueItemResolved?.Invoke(__value6); } - else if (IsQueueItemAction) + else if (QueueItemAction is { } __value7) { - queueItemAction?.Invoke(QueueItemAction!); + queueItemAction?.Invoke(__value7); } - else if (IsQueueItemRejected) + else if (QueueItemRejected is { } __value8) { - queueItemRejected?.Invoke(QueueItemRejected!); + queueItemRejected?.Invoke(__value8); } - else if (IsQueueItemAllowed) + else if (QueueItemAllowed is { } __value9) { - queueItemAllowed?.Invoke(QueueItemAllowed!); + queueItemAllowed?.Invoke(__value9); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ModerationAPIClient.NewModerateModerate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ModerationAPIClient.NewModerateModerate.g.cs index 2ab4052..231a424 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ModerationAPIClient.NewModerateModerate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ModerationAPIClient.NewModerateModerate.g.cs @@ -206,7 +206,7 @@ partial void ProcessNewModerateModerateResponseContent( pathTemplate: "\"/moderate\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -240,7 +240,7 @@ partial void ProcessNewModerateModerateResponseContent( pathTemplate: "\"/moderate\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -281,7 +281,7 @@ partial void ProcessNewModerateModerateResponseContent( pathTemplate: "\"/moderate\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -329,7 +329,7 @@ partial void ProcessNewModerateModerateResponseContent( pathTemplate: "\"/moderate\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -351,7 +351,7 @@ partial void ProcessNewModerateModerateResponseContent( pathTemplate: "\"/moderate\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.2.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.2.g.cs index c911078..1f03dc8 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.2.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.2.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// /// @@ -176,13 +176,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } return default(TResult); @@ -202,13 +202,13 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } } @@ -225,13 +225,13 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.29.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.29.g.cs index 407bb34..26f7564 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.29.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.29.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// @@ -115,8 +115,8 @@ public bool TryPickValue3( /// /// /// - public T3 PickValue3() => IsValue3 - ? Value3! + public T3 PickValue3() => Value3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value3' but the value was {ToString()}."); /// @@ -152,8 +152,8 @@ public bool TryPickValue4( /// /// /// - public T4 PickValue4() => IsValue4 - ? Value4! + public T4 PickValue4() => Value4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value4' but the value was {ToString()}."); /// @@ -189,8 +189,8 @@ public bool TryPickValue5( /// /// /// - public T5 PickValue5() => IsValue5 - ? Value5! + public T5 PickValue5() => Value5 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value5' but the value was {ToString()}."); /// @@ -226,8 +226,8 @@ public bool TryPickValue6( /// /// /// - public T6 PickValue6() => IsValue6 - ? Value6! + public T6 PickValue6() => Value6 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value6' but the value was {ToString()}."); /// @@ -263,8 +263,8 @@ public bool TryPickValue7( /// /// /// - public T7 PickValue7() => IsValue7 - ? Value7! + public T7 PickValue7() => Value7 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value7' but the value was {ToString()}."); /// @@ -300,8 +300,8 @@ public bool TryPickValue8( /// /// /// - public T8 PickValue8() => IsValue8 - ? Value8! + public T8 PickValue8() => Value8 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value8' but the value was {ToString()}."); /// @@ -337,8 +337,8 @@ public bool TryPickValue9( /// /// /// - public T9 PickValue9() => IsValue9 - ? Value9! + public T9 PickValue9() => Value9 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value9' but the value was {ToString()}."); /// @@ -374,8 +374,8 @@ public bool TryPickValue10( /// /// /// - public T10 PickValue10() => IsValue10 - ? Value10! + public T10 PickValue10() => Value10 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value10' but the value was {ToString()}."); /// @@ -411,8 +411,8 @@ public bool TryPickValue11( /// /// /// - public T11 PickValue11() => IsValue11 - ? Value11! + public T11 PickValue11() => Value11 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value11' but the value was {ToString()}."); /// @@ -448,8 +448,8 @@ public bool TryPickValue12( /// /// /// - public T12 PickValue12() => IsValue12 - ? Value12! + public T12 PickValue12() => Value12 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value12' but the value was {ToString()}."); /// @@ -485,8 +485,8 @@ public bool TryPickValue13( /// /// /// - public T13 PickValue13() => IsValue13 - ? Value13! + public T13 PickValue13() => Value13 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value13' but the value was {ToString()}."); /// @@ -522,8 +522,8 @@ public bool TryPickValue14( /// /// /// - public T14 PickValue14() => IsValue14 - ? Value14! + public T14 PickValue14() => Value14 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value14' but the value was {ToString()}."); /// @@ -559,8 +559,8 @@ public bool TryPickValue15( /// /// /// - public T15 PickValue15() => IsValue15 - ? Value15! + public T15 PickValue15() => Value15 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value15' but the value was {ToString()}."); /// @@ -596,8 +596,8 @@ public bool TryPickValue16( /// /// /// - public T16 PickValue16() => IsValue16 - ? Value16! + public T16 PickValue16() => Value16 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value16' but the value was {ToString()}."); /// @@ -633,8 +633,8 @@ public bool TryPickValue17( /// /// /// - public T17 PickValue17() => IsValue17 - ? Value17! + public T17 PickValue17() => Value17 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value17' but the value was {ToString()}."); /// @@ -670,8 +670,8 @@ public bool TryPickValue18( /// /// /// - public T18 PickValue18() => IsValue18 - ? Value18! + public T18 PickValue18() => Value18 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value18' but the value was {ToString()}."); /// @@ -707,8 +707,8 @@ public bool TryPickValue19( /// /// /// - public T19 PickValue19() => IsValue19 - ? Value19! + public T19 PickValue19() => Value19 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value19' but the value was {ToString()}."); /// @@ -744,8 +744,8 @@ public bool TryPickValue20( /// /// /// - public T20 PickValue20() => IsValue20 - ? Value20! + public T20 PickValue20() => Value20 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value20' but the value was {ToString()}."); /// @@ -781,8 +781,8 @@ public bool TryPickValue21( /// /// /// - public T21 PickValue21() => IsValue21 - ? Value21! + public T21 PickValue21() => Value21 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value21' but the value was {ToString()}."); /// @@ -818,8 +818,8 @@ public bool TryPickValue22( /// /// /// - public T22 PickValue22() => IsValue22 - ? Value22! + public T22 PickValue22() => Value22 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value22' but the value was {ToString()}."); /// @@ -855,8 +855,8 @@ public bool TryPickValue23( /// /// /// - public T23 PickValue23() => IsValue23 - ? Value23! + public T23 PickValue23() => Value23 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value23' but the value was {ToString()}."); /// @@ -892,8 +892,8 @@ public bool TryPickValue24( /// /// /// - public T24 PickValue24() => IsValue24 - ? Value24! + public T24 PickValue24() => Value24 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value24' but the value was {ToString()}."); /// @@ -929,8 +929,8 @@ public bool TryPickValue25( /// /// /// - public T25 PickValue25() => IsValue25 - ? Value25! + public T25 PickValue25() => Value25 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value25' but the value was {ToString()}."); /// @@ -966,8 +966,8 @@ public bool TryPickValue26( /// /// /// - public T26 PickValue26() => IsValue26 - ? Value26! + public T26 PickValue26() => Value26 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value26' but the value was {ToString()}."); /// @@ -1003,8 +1003,8 @@ public bool TryPickValue27( /// /// /// - public T27 PickValue27() => IsValue27 - ? Value27! + public T27 PickValue27() => Value27 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value27' but the value was {ToString()}."); /// @@ -1040,8 +1040,8 @@ public bool TryPickValue28( /// /// /// - public T28 PickValue28() => IsValue28 - ? Value28! + public T28 PickValue28() => Value28 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value28' but the value was {ToString()}."); /// @@ -1077,8 +1077,8 @@ public bool TryPickValue29( /// /// /// - public T29 PickValue29() => IsValue29 - ? Value29! + public T29 PickValue29() => Value29 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value29' but the value was {ToString()}."); /// /// @@ -1931,121 +1931,121 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } - else if (IsValue3 && value3 != null) + else if (Value3 is { } __value2 && value3 != null) { - return value3(Value3!); + return value3(__value2); } - else if (IsValue4 && value4 != null) + else if (Value4 is { } __value3 && value4 != null) { - return value4(Value4!); + return value4(__value3); } - else if (IsValue5 && value5 != null) + else if (Value5 is { } __value4 && value5 != null) { - return value5(Value5!); + return value5(__value4); } - else if (IsValue6 && value6 != null) + else if (Value6 is { } __value5 && value6 != null) { - return value6(Value6!); + return value6(__value5); } - else if (IsValue7 && value7 != null) + else if (Value7 is { } __value6 && value7 != null) { - return value7(Value7!); + return value7(__value6); } - else if (IsValue8 && value8 != null) + else if (Value8 is { } __value7 && value8 != null) { - return value8(Value8!); + return value8(__value7); } - else if (IsValue9 && value9 != null) + else if (Value9 is { } __value8 && value9 != null) { - return value9(Value9!); + return value9(__value8); } - else if (IsValue10 && value10 != null) + else if (Value10 is { } __value9 && value10 != null) { - return value10(Value10!); + return value10(__value9); } - else if (IsValue11 && value11 != null) + else if (Value11 is { } __value10 && value11 != null) { - return value11(Value11!); + return value11(__value10); } - else if (IsValue12 && value12 != null) + else if (Value12 is { } __value11 && value12 != null) { - return value12(Value12!); + return value12(__value11); } - else if (IsValue13 && value13 != null) + else if (Value13 is { } __value12 && value13 != null) { - return value13(Value13!); + return value13(__value12); } - else if (IsValue14 && value14 != null) + else if (Value14 is { } __value13 && value14 != null) { - return value14(Value14!); + return value14(__value13); } - else if (IsValue15 && value15 != null) + else if (Value15 is { } __value14 && value15 != null) { - return value15(Value15!); + return value15(__value14); } - else if (IsValue16 && value16 != null) + else if (Value16 is { } __value15 && value16 != null) { - return value16(Value16!); + return value16(__value15); } - else if (IsValue17 && value17 != null) + else if (Value17 is { } __value16 && value17 != null) { - return value17(Value17!); + return value17(__value16); } - else if (IsValue18 && value18 != null) + else if (Value18 is { } __value17 && value18 != null) { - return value18(Value18!); + return value18(__value17); } - else if (IsValue19 && value19 != null) + else if (Value19 is { } __value18 && value19 != null) { - return value19(Value19!); + return value19(__value18); } - else if (IsValue20 && value20 != null) + else if (Value20 is { } __value19 && value20 != null) { - return value20(Value20!); + return value20(__value19); } - else if (IsValue21 && value21 != null) + else if (Value21 is { } __value20 && value21 != null) { - return value21(Value21!); + return value21(__value20); } - else if (IsValue22 && value22 != null) + else if (Value22 is { } __value21 && value22 != null) { - return value22(Value22!); + return value22(__value21); } - else if (IsValue23 && value23 != null) + else if (Value23 is { } __value22 && value23 != null) { - return value23(Value23!); + return value23(__value22); } - else if (IsValue24 && value24 != null) + else if (Value24 is { } __value23 && value24 != null) { - return value24(Value24!); + return value24(__value23); } - else if (IsValue25 && value25 != null) + else if (Value25 is { } __value24 && value25 != null) { - return value25(Value25!); + return value25(__value24); } - else if (IsValue26 && value26 != null) + else if (Value26 is { } __value25 && value26 != null) { - return value26(Value26!); + return value26(__value25); } - else if (IsValue27 && value27 != null) + else if (Value27 is { } __value26 && value27 != null) { - return value27(Value27!); + return value27(__value26); } - else if (IsValue28 && value28 != null) + else if (Value28 is { } __value27 && value28 != null) { - return value28(Value28!); + return value28(__value27); } - else if (IsValue29 && value29 != null) + else if (Value29 is { } __value28 && value29 != null) { - return value29(Value29!); + return value29(__value28); } return default(TResult); @@ -2119,121 +2119,121 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } - else if (IsValue5) + else if (Value5 is { } __value4) { - value5?.Invoke(Value5!); + value5?.Invoke(__value4); } - else if (IsValue6) + else if (Value6 is { } __value5) { - value6?.Invoke(Value6!); + value6?.Invoke(__value5); } - else if (IsValue7) + else if (Value7 is { } __value6) { - value7?.Invoke(Value7!); + value7?.Invoke(__value6); } - else if (IsValue8) + else if (Value8 is { } __value7) { - value8?.Invoke(Value8!); + value8?.Invoke(__value7); } - else if (IsValue9) + else if (Value9 is { } __value8) { - value9?.Invoke(Value9!); + value9?.Invoke(__value8); } - else if (IsValue10) + else if (Value10 is { } __value9) { - value10?.Invoke(Value10!); + value10?.Invoke(__value9); } - else if (IsValue11) + else if (Value11 is { } __value10) { - value11?.Invoke(Value11!); + value11?.Invoke(__value10); } - else if (IsValue12) + else if (Value12 is { } __value11) { - value12?.Invoke(Value12!); + value12?.Invoke(__value11); } - else if (IsValue13) + else if (Value13 is { } __value12) { - value13?.Invoke(Value13!); + value13?.Invoke(__value12); } - else if (IsValue14) + else if (Value14 is { } __value13) { - value14?.Invoke(Value14!); + value14?.Invoke(__value13); } - else if (IsValue15) + else if (Value15 is { } __value14) { - value15?.Invoke(Value15!); + value15?.Invoke(__value14); } - else if (IsValue16) + else if (Value16 is { } __value15) { - value16?.Invoke(Value16!); + value16?.Invoke(__value15); } - else if (IsValue17) + else if (Value17 is { } __value16) { - value17?.Invoke(Value17!); + value17?.Invoke(__value16); } - else if (IsValue18) + else if (Value18 is { } __value17) { - value18?.Invoke(Value18!); + value18?.Invoke(__value17); } - else if (IsValue19) + else if (Value19 is { } __value18) { - value19?.Invoke(Value19!); + value19?.Invoke(__value18); } - else if (IsValue20) + else if (Value20 is { } __value19) { - value20?.Invoke(Value20!); + value20?.Invoke(__value19); } - else if (IsValue21) + else if (Value21 is { } __value20) { - value21?.Invoke(Value21!); + value21?.Invoke(__value20); } - else if (IsValue22) + else if (Value22 is { } __value21) { - value22?.Invoke(Value22!); + value22?.Invoke(__value21); } - else if (IsValue23) + else if (Value23 is { } __value22) { - value23?.Invoke(Value23!); + value23?.Invoke(__value22); } - else if (IsValue24) + else if (Value24 is { } __value23) { - value24?.Invoke(Value24!); + value24?.Invoke(__value23); } - else if (IsValue25) + else if (Value25 is { } __value24) { - value25?.Invoke(Value25!); + value25?.Invoke(__value24); } - else if (IsValue26) + else if (Value26 is { } __value25) { - value26?.Invoke(Value26!); + value26?.Invoke(__value25); } - else if (IsValue27) + else if (Value27 is { } __value26) { - value27?.Invoke(Value27!); + value27?.Invoke(__value26); } - else if (IsValue28) + else if (Value28 is { } __value27) { - value28?.Invoke(Value28!); + value28?.Invoke(__value27); } - else if (IsValue29) + else if (Value29 is { } __value28) { - value29?.Invoke(Value29!); + value29?.Invoke(__value28); } } @@ -2277,121 +2277,121 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } - else if (IsValue5) + else if (Value5 is { } __value4) { - value5?.Invoke(Value5!); + value5?.Invoke(__value4); } - else if (IsValue6) + else if (Value6 is { } __value5) { - value6?.Invoke(Value6!); + value6?.Invoke(__value5); } - else if (IsValue7) + else if (Value7 is { } __value6) { - value7?.Invoke(Value7!); + value7?.Invoke(__value6); } - else if (IsValue8) + else if (Value8 is { } __value7) { - value8?.Invoke(Value8!); + value8?.Invoke(__value7); } - else if (IsValue9) + else if (Value9 is { } __value8) { - value9?.Invoke(Value9!); + value9?.Invoke(__value8); } - else if (IsValue10) + else if (Value10 is { } __value9) { - value10?.Invoke(Value10!); + value10?.Invoke(__value9); } - else if (IsValue11) + else if (Value11 is { } __value10) { - value11?.Invoke(Value11!); + value11?.Invoke(__value10); } - else if (IsValue12) + else if (Value12 is { } __value11) { - value12?.Invoke(Value12!); + value12?.Invoke(__value11); } - else if (IsValue13) + else if (Value13 is { } __value12) { - value13?.Invoke(Value13!); + value13?.Invoke(__value12); } - else if (IsValue14) + else if (Value14 is { } __value13) { - value14?.Invoke(Value14!); + value14?.Invoke(__value13); } - else if (IsValue15) + else if (Value15 is { } __value14) { - value15?.Invoke(Value15!); + value15?.Invoke(__value14); } - else if (IsValue16) + else if (Value16 is { } __value15) { - value16?.Invoke(Value16!); + value16?.Invoke(__value15); } - else if (IsValue17) + else if (Value17 is { } __value16) { - value17?.Invoke(Value17!); + value17?.Invoke(__value16); } - else if (IsValue18) + else if (Value18 is { } __value17) { - value18?.Invoke(Value18!); + value18?.Invoke(__value17); } - else if (IsValue19) + else if (Value19 is { } __value18) { - value19?.Invoke(Value19!); + value19?.Invoke(__value18); } - else if (IsValue20) + else if (Value20 is { } __value19) { - value20?.Invoke(Value20!); + value20?.Invoke(__value19); } - else if (IsValue21) + else if (Value21 is { } __value20) { - value21?.Invoke(Value21!); + value21?.Invoke(__value20); } - else if (IsValue22) + else if (Value22 is { } __value21) { - value22?.Invoke(Value22!); + value22?.Invoke(__value21); } - else if (IsValue23) + else if (Value23 is { } __value22) { - value23?.Invoke(Value23!); + value23?.Invoke(__value22); } - else if (IsValue24) + else if (Value24 is { } __value23) { - value24?.Invoke(Value24!); + value24?.Invoke(__value23); } - else if (IsValue25) + else if (Value25 is { } __value24) { - value25?.Invoke(Value25!); + value25?.Invoke(__value24); } - else if (IsValue26) + else if (Value26 is { } __value25) { - value26?.Invoke(Value26!); + value26?.Invoke(__value25); } - else if (IsValue27) + else if (Value27 is { } __value26) { - value27?.Invoke(Value27!); + value27?.Invoke(__value26); } - else if (IsValue28) + else if (Value28 is { } __value27) { - value28?.Invoke(Value28!); + value28?.Invoke(__value27); } - else if (IsValue29) + else if (Value29 is { } __value28) { - value29?.Invoke(Value29!); + value29?.Invoke(__value28); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.4.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.4.g.cs index 4790883..cf7aca9 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.4.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.4.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// @@ -115,8 +115,8 @@ public bool TryPickValue3( /// /// /// - public T3 PickValue3() => IsValue3 - ? Value3! + public T3 PickValue3() => Value3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value3' but the value was {ToString()}."); /// @@ -152,8 +152,8 @@ public bool TryPickValue4( /// /// /// - public T4 PickValue4() => IsValue4 - ? Value4! + public T4 PickValue4() => Value4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value4' but the value was {ToString()}."); /// /// @@ -306,21 +306,21 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } - else if (IsValue3 && value3 != null) + else if (Value3 is { } __value2 && value3 != null) { - return value3(Value3!); + return value3(__value2); } - else if (IsValue4 && value4 != null) + else if (Value4 is { } __value3 && value4 != null) { - return value4(Value4!); + return value4(__value3); } return default(TResult); @@ -344,21 +344,21 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } } @@ -377,21 +377,21 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.5.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.5.g.cs index 55af050..e0fe22a 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.5.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.OneOf.5.g.cs @@ -41,8 +41,8 @@ public bool TryPickValue1( /// /// /// - public T1 PickValue1() => IsValue1 - ? Value1! + public T1 PickValue1() => Value1 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}."); /// @@ -78,8 +78,8 @@ public bool TryPickValue2( /// /// /// - public T2 PickValue2() => IsValue2 - ? Value2! + public T2 PickValue2() => Value2 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}."); /// @@ -115,8 +115,8 @@ public bool TryPickValue3( /// /// /// - public T3 PickValue3() => IsValue3 - ? Value3! + public T3 PickValue3() => Value3 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value3' but the value was {ToString()}."); /// @@ -152,8 +152,8 @@ public bool TryPickValue4( /// /// /// - public T4 PickValue4() => IsValue4 - ? Value4! + public T4 PickValue4() => Value4 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value4' but the value was {ToString()}."); /// @@ -189,8 +189,8 @@ public bool TryPickValue5( /// /// /// - public T5 PickValue5() => IsValue5 - ? Value5! + public T5 PickValue5() => Value5 is { } value + ? value : throw new global::System.InvalidOperationException($"Expected union variant 'Value5' but the value was {ToString()}."); /// /// @@ -371,25 +371,25 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (Value1 is { } __value0 && value1 != null) { - return value1(Value1!); + return value1(__value0); } - else if (IsValue2 && value2 != null) + else if (Value2 is { } __value1 && value2 != null) { - return value2(Value2!); + return value2(__value1); } - else if (IsValue3 && value3 != null) + else if (Value3 is { } __value2 && value3 != null) { - return value3(Value3!); + return value3(__value2); } - else if (IsValue4 && value4 != null) + else if (Value4 is { } __value3 && value4 != null) { - return value4(Value4!); + return value4(__value3); } - else if (IsValue5 && value5 != null) + else if (Value5 is { } __value4 && value5 != null) { - return value5(Value5!); + return value5(__value4); } return default(TResult); @@ -415,25 +415,25 @@ public void Match( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } - else if (IsValue5) + else if (Value5 is { } __value4) { - value5?.Invoke(Value5!); + value5?.Invoke(__value4); } } @@ -453,25 +453,25 @@ public void Switch( Validate(); } - if (IsValue1) + if (Value1 is { } __value0) { - value1?.Invoke(Value1!); + value1?.Invoke(__value0); } - else if (IsValue2) + else if (Value2 is { } __value1) { - value2?.Invoke(Value2!); + value2?.Invoke(__value1); } - else if (IsValue3) + else if (Value3 is { } __value2) { - value3?.Invoke(Value3!); + value3?.Invoke(__value2); } - else if (IsValue4) + else if (Value4 is { } __value3) { - value4?.Invoke(Value4!); + value4?.Invoke(__value3); } - else if (IsValue5) + else if (Value5 is { } __value4) { - value5?.Invoke(Value5!); + value5?.Invoke(__value4); } } diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetItems.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetItems.g.cs index 21c6486..7f7f9e5 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetItems.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetItems.g.cs @@ -288,7 +288,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( PrepareQueueViewOpenGetItemsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, pageSize: pageSize, pageNumber: pageNumber, sortField: sortField, @@ -321,7 +321,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( pathTemplate: "$\"/queue/{id}/items\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -355,7 +355,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( pathTemplate: "$\"/queue/{id}/items\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -396,7 +396,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( pathTemplate: "$\"/queue/{id}/items\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -444,7 +444,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( pathTemplate: "$\"/queue/{id}/items\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -466,7 +466,7 @@ partial void ProcessQueueViewOpenGetItemsResponseContent( pathTemplate: "$\"/queue/{id}/items\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetQueue.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetQueue.g.cs index d9211ae..99a444a 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetQueue.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetQueue.g.cs @@ -169,7 +169,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( PrepareQueueViewOpenGetQueueRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( pathTemplate: "$\"/queue/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( pathTemplate: "$\"/queue/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( pathTemplate: "$\"/queue/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( pathTemplate: "$\"/queue/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessQueueViewOpenGetQueueResponseContent( pathTemplate: "$\"/queue/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetStats.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetStats.g.cs index 2ed8f9b..77bb4dd 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetStats.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenGetStats.g.cs @@ -186,7 +186,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( PrepareQueueViewOpenGetStatsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, withinDays: withinDays); return __httpRequest; @@ -209,7 +209,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( pathTemplate: "$\"/queue/{id}/stats\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -243,7 +243,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( pathTemplate: "$\"/queue/{id}/stats\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -284,7 +284,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( pathTemplate: "$\"/queue/{id}/stats\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -332,7 +332,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( pathTemplate: "$\"/queue/{id}/stats\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -354,7 +354,7 @@ partial void ProcessQueueViewOpenGetStatsResponseContent( pathTemplate: "$\"/queue/{id}/stats\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenResolveItem.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenResolveItem.g.cs index d25f06f..5b03669 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenResolveItem.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenResolveItem.g.cs @@ -208,8 +208,8 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( PrepareQueueViewOpenResolveItemRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, - itemId: itemId!, + id: id, + itemId: itemId, request: request); return __httpRequest; @@ -232,7 +232,7 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/resolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/resolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/resolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -355,7 +355,7 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/resolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -377,7 +377,7 @@ partial void ProcessQueueViewOpenResolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/resolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenUnresolveItem.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenUnresolveItem.g.cs index 18af42c..f077942 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenUnresolveItem.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.ReviewQueuesClient.QueueViewOpenUnresolveItem.g.cs @@ -208,8 +208,8 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( PrepareQueueViewOpenUnresolveItemRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, - itemId: itemId!, + id: id, + itemId: itemId, request: request); return __httpRequest; @@ -232,7 +232,7 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/unresolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/unresolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -307,7 +307,7 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/unresolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -355,7 +355,7 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/unresolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -377,7 +377,7 @@ partial void ProcessQueueViewOpenUnresolveItemResponseContent( pathTemplate: "$\"/queue/{id}/items/{itemId}/unresolve\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.VoiceClient.GetStream.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.VoiceClient.GetStream.g.cs index 62db384..93d76d5 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.VoiceClient.GetStream.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.VoiceClient.GetStream.g.cs @@ -182,7 +182,7 @@ await GetStreamAsResponseAsync( PrepareGetStreamRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - secWebSocketProtocol: secWebSocketProtocol!, + secWebSocketProtocol: secWebSocketProtocol, request: request); return __httpRequest; @@ -205,7 +205,7 @@ await GetStreamAsResponseAsync( pathTemplate: "\"/stream\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -239,7 +239,7 @@ await GetStreamAsResponseAsync( pathTemplate: "\"/stream\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -280,7 +280,7 @@ await GetStreamAsResponseAsync( pathTemplate: "\"/stream\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -328,7 +328,7 @@ await GetStreamAsResponseAsync( pathTemplate: "\"/stream\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -350,7 +350,7 @@ await GetStreamAsResponseAsync( pathTemplate: "\"/stream\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistAddWords.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistAddWords.g.cs index 84ebe82..0c100c2 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistAddWords.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistAddWords.g.cs @@ -202,7 +202,7 @@ partial void ProcessWordlistAddWordsResponseContent( PrepareWordlistAddWordsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); return __httpRequest; @@ -225,7 +225,7 @@ partial void ProcessWordlistAddWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -259,7 +259,7 @@ partial void ProcessWordlistAddWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -300,7 +300,7 @@ partial void ProcessWordlistAddWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -348,7 +348,7 @@ partial void ProcessWordlistAddWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -370,7 +370,7 @@ partial void ProcessWordlistAddWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "POST", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistGetWordlistPublic.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistGetWordlistPublic.g.cs index 97ddd9d..9e65f7f 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistGetWordlistPublic.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistGetWordlistPublic.g.cs @@ -169,7 +169,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( PrepareWordlistGetWordlistPublicRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessWordlistGetWordlistPublicResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistList.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistList.g.cs index cba7e65..9240c88 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistList.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistList.g.cs @@ -178,7 +178,7 @@ partial void ProcessWordlistListResponseContent( pathTemplate: "\"/wordlist\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -212,7 +212,7 @@ partial void ProcessWordlistListResponseContent( pathTemplate: "\"/wordlist\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -253,7 +253,7 @@ partial void ProcessWordlistListResponseContent( pathTemplate: "\"/wordlist\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -301,7 +301,7 @@ partial void ProcessWordlistListResponseContent( pathTemplate: "\"/wordlist\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -323,7 +323,7 @@ partial void ProcessWordlistListResponseContent( pathTemplate: "\"/wordlist\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistRemoveWords.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistRemoveWords.g.cs index 8fcdfde..6984190 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistRemoveWords.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistRemoveWords.g.cs @@ -198,8 +198,8 @@ partial void ProcessWordlistRemoveWordsResponseContent( PrepareWordlistRemoveWordsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, - words: words!); + id: id, + words: words); return __httpRequest; } @@ -221,7 +221,7 @@ partial void ProcessWordlistRemoveWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -255,7 +255,7 @@ partial void ProcessWordlistRemoveWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -296,7 +296,7 @@ partial void ProcessWordlistRemoveWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -344,7 +344,7 @@ partial void ProcessWordlistRemoveWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -366,7 +366,7 @@ partial void ProcessWordlistRemoveWordsResponseContent( pathTemplate: "$\"/wordlist/{id}/words\"", httpMethod: "DELETE", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistUpdate.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistUpdate.g.cs index 2afd884..54a9789 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistUpdate.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistUpdate.g.cs @@ -188,7 +188,7 @@ partial void ProcessWordlistUpdateResponseContent( PrepareWordlistUpdateRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!, + id: id, request: request); return __httpRequest; @@ -211,7 +211,7 @@ partial void ProcessWordlistUpdateResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -245,7 +245,7 @@ partial void ProcessWordlistUpdateResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -286,7 +286,7 @@ partial void ProcessWordlistUpdateResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -334,7 +334,7 @@ partial void ProcessWordlistUpdateResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -356,7 +356,7 @@ partial void ProcessWordlistUpdateResponseContent( pathTemplate: "$\"/wordlist/{id}\"", httpMethod: "PUT", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, diff --git a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistWordlistEmbeddingStatus.g.cs b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistWordlistEmbeddingStatus.g.cs index a916111..94c36bd 100644 --- a/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistWordlistEmbeddingStatus.g.cs +++ b/src/libs/ModerationAPI/Generated/ModerationAPI.WordlistClient.WordlistWordlistEmbeddingStatus.g.cs @@ -169,7 +169,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( PrepareWordlistWordlistEmbeddingStatusRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id!); + id: id); return __httpRequest; } @@ -191,7 +191,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( pathTemplate: "$\"/wordlist/{id}/embedding-status\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: null, clientOptions: Options, @@ -225,7 +225,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( pathTemplate: "$\"/wordlist/{id}/embedding-status\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: null, exception: __exception, clientOptions: Options, @@ -266,7 +266,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( pathTemplate: "$\"/wordlist/{id}/embedding-status\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -314,7 +314,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( pathTemplate: "$\"/wordlist/{id}/embedding-status\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options, @@ -336,7 +336,7 @@ partial void ProcessWordlistWordlistEmbeddingStatusResponseContent( pathTemplate: "$\"/wordlist/{id}/embedding-status\"", httpMethod: "GET", baseUri: BaseUri, - request: __httpRequest!, + request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."), response: __response, exception: null, clientOptions: Options,