Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and HavenDV committed Aug 12, 2024
1 parent 403c745 commit 92c088b
Show file tree
Hide file tree
Showing 4,275 changed files with 141,867 additions and 113,172 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
288 changes: 288 additions & 0 deletions src/libs/GitHub/Generated/AnyOf.5.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
using System.Linq;

#nullable enable

namespace System
{
/// <summary>
///
/// </summary>
public readonly partial struct AnyOf<T1, T2, T3, T4, T5> : global::System.IEquatable<AnyOf<T1, T2, T3, T4, T5>>
{
/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T1? Value1 { get; init; }
#else
public T1? Value1 { get; }
#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 static implicit operator AnyOf<T1, T2, T3, T4, T5>(T1 value) => new AnyOf<T1, T2, T3, T4, T5>(value);

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

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

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T2? Value2 { get; init; }
#else
public T2? Value2 { get; }
#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 static implicit operator AnyOf<T1, T2, T3, T4, T5>(T2 value) => new AnyOf<T1, T2, T3, T4, T5>(value);

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

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

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T3? Value3 { get; init; }
#else
public T3? Value3 { get; }
#endif

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

/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5>(T3 value) => new AnyOf<T1, T2, T3, T4, T5>(value);

/// <summary>
///
/// </summary>
public static implicit operator T3?(AnyOf<T1, T2, T3, T4, T5> @this) => @this.Value3;

/// <summary>
///
/// </summary>
public AnyOf(T3? value)
{
Value3 = value;
}

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T4? Value4 { get; init; }
#else
public T4? Value4 { get; }
#endif

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

/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5>(T4 value) => new AnyOf<T1, T2, T3, T4, T5>(value);

/// <summary>
///
/// </summary>
public static implicit operator T4?(AnyOf<T1, T2, T3, T4, T5> @this) => @this.Value4;

/// <summary>
///
/// </summary>
public AnyOf(T4? value)
{
Value4 = value;
}

/// <summary>
///
/// </summary>
#if NET6_0_OR_GREATER
public T5? Value5 { get; init; }
#else
public T5? Value5 { get; }
#endif

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

/// <summary>
///
/// </summary>
public static implicit operator AnyOf<T1, T2, T3, T4, T5>(T5 value) => new AnyOf<T1, T2, T3, T4, T5>(value);

/// <summary>
///
/// </summary>
public static implicit operator T5?(AnyOf<T1, T2, T3, T4, T5> @this) => @this.Value5;

/// <summary>
///
/// </summary>
public AnyOf(T5? value)
{
Value5 = value;
}

/// <summary>
///
/// </summary>
public AnyOf(
T1? value1,
T2? value2,
T3? value3,
T4? value4,
T5? value5
)
{
Value1 = value1;
Value2 = value2;
Value3 = value3;
Value4 = value4;
Value5 = value5;
}

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

/// <summary>
///
/// </summary>
public bool Validate()
{
return IsValue1 || IsValue2 || IsValue3 || IsValue4 || IsValue5;
}

/// <summary>
///
/// </summary>
public override int GetHashCode()
{
var fields = new object?[]
{
Value1,
typeof(T1),
Value2,
typeof(T2),
Value3,
typeof(T3),
Value4,
typeof(T4),
Value5,
typeof(T5),
};
const int offset = unchecked((int)2166136261);
const int prime = 16777619;
static int HashCodeAggregator(int hashCode, object? value) => value == null
? (hashCode ^ 0) * prime
: (hashCode ^ value.GetHashCode()) * prime;
return fields.Aggregate(offset, HashCodeAggregator);
}

/// <summary>
///
/// </summary>
public bool Equals(AnyOf<T1, T2, T3, T4, T5> 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<T3?>.Default.Equals(Value3, other.Value3) &&
global::System.Collections.Generic.EqualityComparer<T4?>.Default.Equals(Value4, other.Value4) &&
global::System.Collections.Generic.EqualityComparer<T5?>.Default.Equals(Value5, other.Value5)
;
}

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

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

/// <summary>
///
/// </summary>
public override bool Equals(object? obj)
{
return obj is AnyOf<T1, T2, T3, T4, T5> o && Equals(o);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ partial void PrepareActionsCreateWorkflowDispatchArguments(
global::System.Net.Http.HttpClient httpClient,
ref string owner,
ref string repo,
ref global::System.OneOf<int, string> workflowId,
ref global::System.OneOf<int, string?> workflowId,
global::GitHub.ActionsCreateWorkflowDispatchRequest request);
partial void PrepareActionsCreateWorkflowDispatchRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string owner,
string repo,
global::System.OneOf<int, string> workflowId,
global::System.OneOf<int, string?> workflowId,
global::GitHub.ActionsCreateWorkflowDispatchRequest request);
partial void ProcessActionsCreateWorkflowDispatchResponse(
global::System.Net.Http.HttpClient httpClient,
Expand All @@ -37,7 +37,7 @@ partial void ProcessActionsCreateWorkflowDispatchResponse(
public async global::System.Threading.Tasks.Task ActionsCreateWorkflowDispatchAsync(
string owner,
string repo,
global::System.OneOf<int, string> workflowId,
global::System.OneOf<int, string?> workflowId,
global::GitHub.ActionsCreateWorkflowDispatchRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand Down Expand Up @@ -106,9 +106,9 @@ partial void ProcessActionsCreateWorkflowDispatchResponse(
public async global::System.Threading.Tasks.Task ActionsCreateWorkflowDispatchAsync(
string owner,
string repo,
global::System.OneOf<int, string> workflowId,
global::System.OneOf<int, string?> workflowId,
string @ref,
object? inputs = default,
global::GitHub.ActionsCreateWorkflowDispatchRequestInputs? inputs = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::GitHub.ActionsCreateWorkflowDispatchRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ partial void PrepareActionsDeleteActionsCacheByKeyArguments(
ref string owner,
ref string repo,
ref string key,
ref string @ref);
ref string? @ref);
partial void PrepareActionsDeleteActionsCacheByKeyRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string owner,
string repo,
string key,
string @ref);
string? @ref);
partial void ProcessActionsDeleteActionsCacheByKeyResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -42,7 +42,7 @@ partial void ProcessActionsDeleteActionsCacheByKeyResponseContent(
string owner,
string repo,
string key,
string @ref,
string? @ref,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ partial void PrepareActionsDisableWorkflowArguments(
global::System.Net.Http.HttpClient httpClient,
ref string owner,
ref string repo,
ref global::System.OneOf<int, string> workflowId);
ref global::System.OneOf<int, string?> workflowId);
partial void PrepareActionsDisableWorkflowRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string owner,
string repo,
global::System.OneOf<int, string> workflowId);
global::System.OneOf<int, string?> workflowId);
partial void ProcessActionsDisableWorkflowResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -33,7 +33,7 @@ partial void ProcessActionsDisableWorkflowResponse(
public async global::System.Threading.Tasks.Task ActionsDisableWorkflowAsync(
string owner,
string repo,
global::System.OneOf<int, string> workflowId,
global::System.OneOf<int, string?> workflowId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand Down
Loading

0 comments on commit 92c088b

Please sign in to comment.