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
50 changes: 50 additions & 0 deletions src/libs/WorldLabs/Generated/WorldLabs.AnyOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ namespace WorldLabs
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
/// </summary>
public bool TryPickValue1(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out T1? value)
{
value = Value1;
return IsValue1;
}

/// <summary>
///
/// </summary>
Expand All @@ -41,6 +54,19 @@ namespace WorldLabs
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;

/// <summary>
///
/// </summary>
public bool TryPickValue2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out T2? value)
{
value = Value2;
return IsValue2;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -143,6 +169,30 @@ public bool Validate()
/// </summary>
public void Match(
global::System.Action<T1>? value1 = null,

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

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<T1>? value1 = null,
global::System.Action<T2>? value2 = null,
bool validate = true)
{
Expand Down
69 changes: 69 additions & 0 deletions src/libs/WorldLabs/Generated/WorldLabs.AnyOf.3.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ namespace WorldLabs
#endif
public bool IsValue1 => Value1 != null;

/// <summary>
///
/// </summary>
public bool TryPickValue1(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out T1? value)
{
value = Value1;
return IsValue1;
}

/// <summary>
///
/// </summary>
Expand All @@ -42,6 +55,19 @@ namespace WorldLabs
#endif
public bool IsValue2 => Value2 != null;

/// <summary>
///
/// </summary>
public bool TryPickValue2(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out T2? value)
{
value = Value2;
return IsValue2;
}

/// <summary>
///
/// </summary>
Expand All @@ -58,6 +84,19 @@ namespace WorldLabs
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))]
#endif
public bool IsValue3 => Value3 != null;

/// <summary>
///
/// </summary>
public bool TryPickValue3(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out T3? value)
{
value = Value3;
return IsValue3;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -187,6 +226,36 @@ public bool Validate()
/// </summary>
public void Match(
global::System.Action<T1>? value1 = null,

global::System.Action<T2>? value2 = null,

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

if (IsValue1)
{
value1?.Invoke(Value1!);
}
else if (IsValue2)
{
value2?.Invoke(Value2!);
}
else if (IsValue3)
{
value3?.Invoke(Value3!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<T1>? value1 = null,
global::System.Action<T2>? value2 = null,
global::System.Action<T3>? value3 = null,
bool validate = true)
Expand Down
81 changes: 75 additions & 6 deletions src/libs/WorldLabs/Generated/WorldLabs.Models.Content2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ namespace WorldLabs
#endif
public bool IsMediaAsset => MediaAsset != null;

/// <summary>
///
/// </summary>
public bool TryPickMediaAsset(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.MediaAssetReference? value)
{
value = MediaAsset;
return IsMediaAsset;
}

/// <summary>
/// Reference to content via a publicly accessible URL.
/// </summary>
Expand All @@ -48,6 +61,19 @@ namespace WorldLabs
#endif
public bool IsUri => Uri != null;

/// <summary>
///
/// </summary>
public bool TryPickUri(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.UriReference? value)
{
value = Uri;
return IsUri;
}

/// <summary>
/// Reference to content via base64-encoded data.
/// </summary>
Expand All @@ -64,6 +90,19 @@ namespace WorldLabs
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DataBase64))]
#endif
public bool IsDataBase64 => DataBase64 != null;

/// <summary>
///
/// </summary>
public bool TryPickDataBase64(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.DataBase64Reference? value)
{
value = DataBase64;
return IsDataBase64;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -165,9 +204,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::WorldLabs.MediaAssetReference?, TResult>? mediaAsset = null,
global::System.Func<global::WorldLabs.UriReference?, TResult>? uri = null,
global::System.Func<global::WorldLabs.DataBase64Reference?, TResult>? dataBase64 = null,
global::System.Func<global::WorldLabs.MediaAssetReference, TResult>? mediaAsset = null,
global::System.Func<global::WorldLabs.UriReference, TResult>? uri = null,
global::System.Func<global::WorldLabs.DataBase64Reference, TResult>? dataBase64 = 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::WorldLabs.MediaAssetReference?>? mediaAsset = null,
global::System.Action<global::WorldLabs.UriReference?>? uri = null,
global::System.Action<global::WorldLabs.DataBase64Reference?>? dataBase64 = null,
global::System.Action<global::WorldLabs.MediaAssetReference>? mediaAsset = null,

global::System.Action<global::WorldLabs.UriReference>? uri = null,

global::System.Action<global::WorldLabs.DataBase64Reference>? dataBase64 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsMediaAsset)
{
mediaAsset?.Invoke(MediaAsset!);
}
else if (IsUri)
{
uri?.Invoke(Uri!);
}
else if (IsDataBase64)
{
dataBase64?.Invoke(DataBase64!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::WorldLabs.MediaAssetReference>? mediaAsset = null,
global::System.Action<global::WorldLabs.UriReference>? uri = null,
global::System.Action<global::WorldLabs.DataBase64Reference>? dataBase64 = null,
bool validate = true)
{
if (validate)
Expand Down
81 changes: 75 additions & 6 deletions src/libs/WorldLabs/Generated/WorldLabs.Models.DepthPanoImage.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ namespace WorldLabs
#endif
public bool IsMediaAsset => MediaAsset != null;

/// <summary>
///
/// </summary>
public bool TryPickMediaAsset(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.MediaAssetReference? value)
{
value = MediaAsset;
return IsMediaAsset;
}

/// <summary>
/// Reference to content via a publicly accessible URL.
/// </summary>
Expand All @@ -48,6 +61,19 @@ namespace WorldLabs
#endif
public bool IsUri => Uri != null;

/// <summary>
///
/// </summary>
public bool TryPickUri(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.UriReference? value)
{
value = Uri;
return IsUri;
}

/// <summary>
/// Reference to content via base64-encoded data.
/// </summary>
Expand All @@ -64,6 +90,19 @@ namespace WorldLabs
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(DataBase64))]
#endif
public bool IsDataBase64 => DataBase64 != null;

/// <summary>
///
/// </summary>
public bool TryPickDataBase64(
#if NET6_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
#endif
out global::WorldLabs.DataBase64Reference? value)
{
value = DataBase64;
return IsDataBase64;
}
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -165,9 +204,9 @@ public bool Validate()
///
/// </summary>
public TResult? Match<TResult>(
global::System.Func<global::WorldLabs.MediaAssetReference?, TResult>? mediaAsset = null,
global::System.Func<global::WorldLabs.UriReference?, TResult>? uri = null,
global::System.Func<global::WorldLabs.DataBase64Reference?, TResult>? dataBase64 = null,
global::System.Func<global::WorldLabs.MediaAssetReference, TResult>? mediaAsset = null,
global::System.Func<global::WorldLabs.UriReference, TResult>? uri = null,
global::System.Func<global::WorldLabs.DataBase64Reference, TResult>? dataBase64 = 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::WorldLabs.MediaAssetReference?>? mediaAsset = null,
global::System.Action<global::WorldLabs.UriReference?>? uri = null,
global::System.Action<global::WorldLabs.DataBase64Reference?>? dataBase64 = null,
global::System.Action<global::WorldLabs.MediaAssetReference>? mediaAsset = null,

global::System.Action<global::WorldLabs.UriReference>? uri = null,

global::System.Action<global::WorldLabs.DataBase64Reference>? dataBase64 = null,
bool validate = true)
{
if (validate)
{
Validate();
}

if (IsMediaAsset)
{
mediaAsset?.Invoke(MediaAsset!);
}
else if (IsUri)
{
uri?.Invoke(Uri!);
}
else if (IsDataBase64)
{
dataBase64?.Invoke(DataBase64!);
}
}

/// <summary>
///
/// </summary>
public void Switch(
global::System.Action<global::WorldLabs.MediaAssetReference>? mediaAsset = null,
global::System.Action<global::WorldLabs.UriReference>? uri = null,
global::System.Action<global::WorldLabs.DataBase64Reference>? dataBase64 = null,
bool validate = true)
{
if (validate)
Expand Down
Loading