Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ partial void ProcessAccountGetResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::ModerationAPI.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ModerationAPI
public sealed partial class AccountClient : global::ModerationAPI.IAccountClient, global::System.IDisposable
{
/// <summary>
///
///
/// </summary>
public const string DefaultBaseUrl = "https://api.moderationapi.com/v1";

Expand Down Expand Up @@ -40,7 +40,7 @@ public sealed partial class AccountClient : global::ModerationAPI.IAccountClient
internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::ModerationAPI.SourceGenerationContext.Default);

/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ partial void ProcessActionsCreateResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ partial void ProcessActionsDeleteResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::ModerationAPI.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ partial void ProcessActionsExecuteResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ partial void ProcessActionsGetResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::ModerationAPI.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ partial void ProcessActionsListResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
global::ModerationAPI.AutoSDKRequestOptionsSupport.ApplyHeaders(
request: __httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessActionsUpdateResponseContent(
__authorization.Location == "Header")
{
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
}
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ModerationAPI
public sealed partial class ActionsClient : global::ModerationAPI.IActionsClient, global::System.IDisposable
{
/// <summary>
///
///
/// </summary>
public const string DefaultBaseUrl = "https://api.moderationapi.com/v1";

Expand Down Expand Up @@ -40,7 +40,7 @@ public sealed partial class ActionsClient : global::ModerationAPI.IActionsClient
internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::ModerationAPI.SourceGenerationContext.Default);

/// <summary>
///
///
/// </summary>
public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext
{
Expand Down
64 changes: 32 additions & 32 deletions src/libs/ModerationAPI/Generated/ModerationAPI.AllOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
namespace ModerationAPI
{
/// <summary>
///
///
/// </summary>
public readonly partial struct AllOf<T1, T2> : global::System.IEquatable<AllOf<T1, T2>>
{
/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
Expand All @@ -18,15 +18,15 @@ namespace ModerationAPI
#endif

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))]
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
///
/// </summary>
public bool TryPickValue1(
#if NET6_0_OR_GREATER
Expand All @@ -39,14 +39,14 @@ public bool TryPickValue1(
}

/// <summary>
///
///
/// </summary>
public T1 PickValue1() => IsValue1
? Value1!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}.");

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
public T2? Value2 { get; init; }
Expand All @@ -55,15 +55,15 @@ public T1 PickValue1() => IsValue1
#endif

/// <summary>
///
///
/// </summary>
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;

/// <summary>
///
///
/// </summary>
public bool TryPickValue2(
#if NET6_0_OR_GREATER
Expand All @@ -76,59 +76,59 @@ public bool TryPickValue2(
}

/// <summary>
///
///
/// </summary>
public T2 PickValue2() => IsValue2
? Value2!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}.");
/// <summary>
///
///
/// </summary>
public static implicit operator AllOf<T1, T2>(T1 value) => new AllOf<T1, T2>((T1?)value);

/// <summary>
///
///
/// </summary>
public static implicit operator T1?(AllOf<T1, T2> @this) => @this.Value1;

/// <summary>
///
///
/// </summary>
public AllOf(T1? value)
{
Value1 = value;
}

/// <summary>
///
///
/// </summary>
public static AllOf<T1, T2> FromValue1(T1? value) => new AllOf<T1, T2>(value);

/// <summary>
///
///
/// </summary>
public static implicit operator AllOf<T1, T2>(T2 value) => new AllOf<T1, T2>((T2?)value);

/// <summary>
///
///
/// </summary>
public static implicit operator T2?(AllOf<T1, T2> @this) => @this.Value2;

/// <summary>
///
///
/// </summary>
public AllOf(T2? value)
{
Value2 = value;
}

/// <summary>
///
///
/// </summary>
public static AllOf<T1, T2> FromValue2(T2? value) => new AllOf<T1, T2>(value);

/// <summary>
///
///
/// </summary>
public AllOf(
T1? value1,
Expand All @@ -140,19 +140,19 @@ public AllOf(
}

/// <summary>
///
///
/// </summary>
public object? Object =>
Value2 as object ??
Value1 as object
Value1 as object
;

/// <summary>
///
///
/// </summary>
public override string? ToString() =>
Value1?.ToString() ??
Value2?.ToString()
Value2?.ToString()
;

private static bool RequiresValue<TValue>()
Expand All @@ -170,15 +170,15 @@ private static bool RequiresValue<TValue>()


/// <summary>
///
///
/// </summary>
public bool Validate()
{
return (!RequiresValue<T1>() || IsValue1) && (!RequiresValue<T2>() || IsValue2);
}

/// <summary>
///
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<T1, TResult>? value1 = null,
Expand All @@ -203,7 +203,7 @@ public bool Validate()
}

/// <summary>
///
///
/// </summary>
public void Match(
global::System.Action<T1>? value1 = null,
Expand All @@ -227,7 +227,7 @@ public void Match(
}

/// <summary>
///
///
/// </summary>
public void Switch(
global::System.Action<T1>? value1 = null,
Expand All @@ -250,7 +250,7 @@ public void Switch(
}

/// <summary>
///
///
/// </summary>
public override int GetHashCode()
{
Expand All @@ -271,34 +271,34 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
}

/// <summary>
///
///
/// </summary>
public bool Equals(AllOf<T1, T2> other)
{
return
global::System.Collections.Generic.EqualityComparer<T1?>.Default.Equals(Value1, other.Value1) &&
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2)
global::System.Collections.Generic.EqualityComparer<T2?>.Default.Equals(Value2, other.Value2)
;
}

/// <summary>
///
///
/// </summary>
public static bool operator ==(AllOf<T1, T2> obj1, AllOf<T1, T2> obj2)
{
return global::System.Collections.Generic.EqualityComparer<AllOf<T1, T2>>.Default.Equals(obj1, obj2);
}

/// <summary>
///
///
/// </summary>
public static bool operator !=(AllOf<T1, T2> obj1, AllOf<T1, T2> obj2)
{
return !(obj1 == obj2);
}

/// <summary>
///
///
/// </summary>
public override bool Equals(object? obj)
{
Expand Down
Loading