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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 75 additions & 6 deletions src/libs/Vapi/Generated/Vapi.Models.AuthenticationPlan2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ namespace Vapi
#endif
public bool IsOauth2 => Oauth2 != null;

/// <summary>
///
/// </summary>
public bool TryPickOauth2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.OAuth2AuthenticationPlan? value)
{
value = Oauth2;
return IsOauth2;
}

/// <summary>
///
/// </summary>
Expand All @@ -48,6 +61,19 @@ namespace Vapi
#endif
public bool IsHmac => Hmac != null;

/// <summary>
///
/// </summary>
public bool TryPickHmac(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.HMACAuthenticationPlan? value)
{
value = Hmac;
return IsHmac;
}

/// <summary>
///
/// </summary>
Expand All @@ -64,6 +90,19 @@ namespace Vapi
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Bearer))]
#endif
public bool IsBearer => Bearer != null;

/// <summary>
///
/// </summary>
public bool TryPickBearer(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.BearerAuthenticationPlan? value)
{
value = Bearer;
return IsBearer;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -165,9 +204,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::Vapi.OAuth2AuthenticationPlan?, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan?, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan?, TResult>? bearer = null,
global::System.Func<global::Vapi.OAuth2AuthenticationPlan, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan, TResult>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down Expand Up @@ -195,9 +234,39 @@ public bool Validate()
///
/// </summary>
public void Match(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan?>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan?>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan?>? bearer = null,
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,

global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,

global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsOauth2)
{
oauth2?.Invoke(Oauth2!);
}
else if (IsHmac)
{
hmac?.Invoke(Hmac!);
}
else if (IsBearer)
{
bearer?.Invoke(Bearer!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down
81 changes: 75 additions & 6 deletions src/libs/Vapi/Generated/Vapi.Models.AuthenticationPlan4.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ namespace Vapi
#endif
public bool IsOauth2 => Oauth2 != null;

/// <summary>
///
/// </summary>
public bool TryPickOauth2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.OAuth2AuthenticationPlan? value)
{
value = Oauth2;
return IsOauth2;
}

/// <summary>
///
/// </summary>
Expand All @@ -48,6 +61,19 @@ namespace Vapi
#endif
public bool IsHmac => Hmac != null;

/// <summary>
///
/// </summary>
public bool TryPickHmac(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.HMACAuthenticationPlan? value)
{
value = Hmac;
return IsHmac;
}

/// <summary>
///
/// </summary>
Expand All @@ -64,6 +90,19 @@ namespace Vapi
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Bearer))]
#endif
public bool IsBearer => Bearer != null;

/// <summary>
///
/// </summary>
public bool TryPickBearer(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.BearerAuthenticationPlan? value)
{
value = Bearer;
return IsBearer;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -165,9 +204,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::Vapi.OAuth2AuthenticationPlan?, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan?, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan?, TResult>? bearer = null,
global::System.Func<global::Vapi.OAuth2AuthenticationPlan, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan, TResult>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down Expand Up @@ -195,9 +234,39 @@ public bool Validate()
///
/// </summary>
public void Match(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan?>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan?>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan?>? bearer = null,
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,

global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,

global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsOauth2)
{
oauth2?.Invoke(Oauth2!);
}
else if (IsHmac)
{
hmac?.Invoke(Hmac!);
}
else if (IsBearer)
{
bearer?.Invoke(Bearer!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down
81 changes: 75 additions & 6 deletions src/libs/Vapi/Generated/Vapi.Models.AuthenticationPlan5.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ namespace Vapi
#endif
public bool IsOauth2 => Oauth2 != null;

/// <summary>
///
/// </summary>
public bool TryPickOauth2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.OAuth2AuthenticationPlan? value)
{
value = Oauth2;
return IsOauth2;
}

/// <summary>
///
/// </summary>
Expand All @@ -48,6 +61,19 @@ namespace Vapi
#endif
public bool IsHmac => Hmac != null;

/// <summary>
///
/// </summary>
public bool TryPickHmac(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.HMACAuthenticationPlan? value)
{
value = Hmac;
return IsHmac;
}

/// <summary>
///
/// </summary>
Expand All @@ -64,6 +90,19 @@ namespace Vapi
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Bearer))]
#endif
public bool IsBearer => Bearer != null;

/// <summary>
///
/// </summary>
public bool TryPickBearer(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::Vapi.BearerAuthenticationPlan? value)
{
value = Bearer;
return IsBearer;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -165,9 +204,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::Vapi.OAuth2AuthenticationPlan?, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan?, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan?, TResult>? bearer = null,
global::System.Func<global::Vapi.OAuth2AuthenticationPlan, TResult>? oauth2 = null,
global::System.Func<global::Vapi.HMACAuthenticationPlan, TResult>? hmac = null,
global::System.Func<global::Vapi.BearerAuthenticationPlan, TResult>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down Expand Up @@ -195,9 +234,39 @@ public bool Validate()
///
/// </summary>
public void Match(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan?>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan?>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan?>? bearer = null,
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,

global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,

global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsOauth2)
{
oauth2?.Invoke(Oauth2!);
}
else if (IsHmac)
{
hmac?.Invoke(Hmac!);
}
else if (IsBearer)
{
bearer?.Invoke(Bearer!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::Vapi.OAuth2AuthenticationPlan>? oauth2 = null,
global::System.Action<global::Vapi.HMACAuthenticationPlan>? hmac = null,
global::System.Action<global::Vapi.BearerAuthenticationPlan>? bearer = null,
bool validate = true)
{
if (validate)
Expand Down
Loading