diff --git a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingImageStrengthRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingImageStrengthRequestBody.g.cs index 88855d1..313b609 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingImageStrengthRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingImageStrengthRequestBody.g.cs @@ -43,8 +43,8 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? value1 = default; - global::StabilityAI.GenerationRequestOptionalParams? value2 = default; + global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? imageToImageUsingImageStrengthRequestBodyVariant1 = default; + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -53,7 +53,7 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + imageToImageUsingImageStrengthRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -68,7 +68,7 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -79,13 +79,13 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy } } - if (value1 == null && value2 == null) + if (imageToImageUsingImageStrengthRequestBodyVariant1 == null && generationOptionalParams == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + imageToImageUsingImageStrengthRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -98,7 +98,7 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -109,9 +109,9 @@ public class ImageToImageUsingImageStrengthRequestBodyJsonConverter : global::Sy } var __value = new global::StabilityAI.ImageToImageUsingImageStrengthRequestBody( - value1, + imageToImageUsingImageStrengthRequestBodyVariant1, - value2 + generationOptionalParams ); return __value; @@ -126,17 +126,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsImageToImageUsingImageStrengthRequestBodyVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageToImageUsingImageStrengthRequestBodyVariant1!, typeInfo); } - else if (value.IsValue2) + else if (value.IsGenerationOptionalParams) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationOptionalParams!, typeInfo); } } } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingStepScheduleRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingStepScheduleRequestBody.g.cs index 7bdf02e..ce7fad2 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingStepScheduleRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.ImageToImageUsingStepScheduleRequestBody.g.cs @@ -44,8 +44,8 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? value1 = default; - global::StabilityAI.GenerationRequestOptionalParams? value2 = default; + global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? imageToImageUsingStepScheduleRequestBodyVariant1 = default; + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -54,7 +54,7 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + imageToImageUsingStepScheduleRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -69,7 +69,7 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -80,13 +80,13 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys } } - if (value1 == null && value2 == null) + if (imageToImageUsingStepScheduleRequestBodyVariant1 == null && generationOptionalParams == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + imageToImageUsingStepScheduleRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -99,7 +99,7 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -110,9 +110,9 @@ public class ImageToImageUsingStepScheduleRequestBodyJsonConverter : global::Sys } var __value = new global::StabilityAI.ImageToImageUsingStepScheduleRequestBody( - value1, + imageToImageUsingStepScheduleRequestBodyVariant1, - value2 + generationOptionalParams ); return __value; @@ -127,17 +127,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsImageToImageUsingStepScheduleRequestBodyVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageToImageUsingStepScheduleRequestBodyVariant1!, typeInfo); } - else if (value.IsValue2) + else if (value.IsGenerationOptionalParams) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationOptionalParams!, typeInfo); } } } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingInitImageAlphaRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingInitImageAlphaRequestBody.g.cs index 9349e34..fdcb7ff 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingInitImageAlphaRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingInitImageAlphaRequestBody.g.cs @@ -42,8 +42,8 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? value1 = default; - global::StabilityAI.GenerationRequestOptionalParams? value2 = default; + global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? maskingUsingInitImageAlphaRequestBodyVariant1 = default; + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -52,7 +52,7 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + maskingUsingInitImageAlphaRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -67,7 +67,7 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -78,13 +78,13 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System } } - if (value1 == null && value2 == null) + if (maskingUsingInitImageAlphaRequestBodyVariant1 == null && generationOptionalParams == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + maskingUsingInitImageAlphaRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -97,7 +97,7 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -108,9 +108,9 @@ public class MaskingUsingInitImageAlphaRequestBodyJsonConverter : global::System } var __value = new global::StabilityAI.MaskingUsingInitImageAlphaRequestBody( - value1, + maskingUsingInitImageAlphaRequestBodyVariant1, - value2 + generationOptionalParams ); return __value; @@ -125,17 +125,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsMaskingUsingInitImageAlphaRequestBodyVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaskingUsingInitImageAlphaRequestBodyVariant1!, typeInfo); } - else if (value.IsValue2) + else if (value.IsGenerationOptionalParams) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationOptionalParams!, typeInfo); } } } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingMaskImageRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingMaskImageRequestBody.g.cs index eadaf91..f8885f2 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingMaskImageRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.MaskingUsingMaskImageRequestBody.g.cs @@ -43,8 +43,8 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? value1 = default; - global::StabilityAI.GenerationRequestOptionalParams? value2 = default; + global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? maskingUsingMaskImageRequestBodyVariant1 = default; + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -53,7 +53,7 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + maskingUsingMaskImageRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -68,7 +68,7 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -79,13 +79,13 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text } } - if (value1 == null && value2 == null) + if (maskingUsingMaskImageRequestBodyVariant1 == null && generationOptionalParams == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + maskingUsingMaskImageRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -98,7 +98,7 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -109,9 +109,9 @@ public class MaskingUsingMaskImageRequestBodyJsonConverter : global::System.Text } var __value = new global::StabilityAI.MaskingUsingMaskImageRequestBody( - value1, + maskingUsingMaskImageRequestBodyVariant1, - value2 + generationOptionalParams ); return __value; @@ -126,17 +126,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsMaskingUsingMaskImageRequestBodyVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaskingUsingMaskImageRequestBodyVariant1!, typeInfo); } - else if (value.IsValue2) + else if (value.IsGenerationOptionalParams) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationOptionalParams!, typeInfo); } } } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.TextToImageRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.TextToImageRequestBody.g.cs index 91ee65c..3f7bd72 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.TextToImageRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.JsonConverters.TextToImageRequestBody.g.cs @@ -42,8 +42,8 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } - global::StabilityAI.TextToImageRequestBodyVariant1? value1 = default; - global::StabilityAI.GenerationRequestOptionalParams? value2 = default; + global::StabilityAI.TextToImageRequestBodyVariant1? textToImageRequestBodyVariant1 = default; + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams = default; if (__bestIndex >= 0) { if (__bestIndex == 0) @@ -52,7 +52,7 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.TextToImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.TextToImageRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + textToImageRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -67,7 +67,7 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -78,13 +78,13 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri } } - if (value1 == null && value2 == null) + if (textToImageRequestBodyVariant1 == null && generationOptionalParams == null) { try { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.TextToImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.TextToImageRequestBodyVariant1).Name}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + textToImageRequestBodyVariant1 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -97,7 +97,7 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + generationOptionalParams = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); } catch (global::System.Text.Json.JsonException) { @@ -108,9 +108,9 @@ public class TextToImageRequestBodyJsonConverter : global::System.Text.Json.Seri } var __value = new global::StabilityAI.TextToImageRequestBody( - value1, + textToImageRequestBodyVariant1, - value2 + generationOptionalParams ); return __value; @@ -125,17 +125,17 @@ public override void Write( options = options ?? throw new global::System.ArgumentNullException(nameof(options)); var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); - if (value.IsValue1) + if (value.IsTextToImageRequestBodyVariant1) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.TextToImageRequestBodyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.TextToImageRequestBodyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextToImageRequestBodyVariant1!, typeInfo); } - else if (value.IsValue2) + else if (value.IsGenerationOptionalParams) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::StabilityAI.GenerationRequestOptionalParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::StabilityAI.GenerationRequestOptionalParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationOptionalParams!, typeInfo); } } } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingImageStrengthRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingImageStrengthRequestBody.g.cs index 927e62a..5a8c651 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingImageStrengthRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingImageStrengthRequestBody.g.cs @@ -13,35 +13,35 @@ namespace StabilityAI /// /// #if NET6_0_OR_GREATER - public global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? Value1 { get; init; } + public global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? ImageToImageUsingImageStrengthRequestBodyVariant1 { get; init; } #else - public global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? Value1 { get; } + public global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? ImageToImageUsingImageStrengthRequestBodyVariant1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageToImageUsingImageStrengthRequestBodyVariant1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsImageToImageUsingImageStrengthRequestBodyVariant1 => ImageToImageUsingImageStrengthRequestBodyVariant1 != null; /// /// Represents the optional parameters that can be passed to any generation request. /// #if NET6_0_OR_GREATER - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; init; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; init; } #else - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationOptionalParams))] #endif - public bool IsValue2 => Value2 != null; + public bool IsGenerationOptionalParams => GenerationOptionalParams != null; /// /// /// @@ -50,14 +50,14 @@ namespace StabilityAI /// /// /// - public static implicit operator global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1?(ImageToImageUsingImageStrengthRequestBody @this) => @this.Value1; + public static implicit operator global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1?(ImageToImageUsingImageStrengthRequestBody @this) => @this.ImageToImageUsingImageStrengthRequestBodyVariant1; /// /// /// public ImageToImageUsingImageStrengthRequestBody(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? value) { - Value1 = value; + ImageToImageUsingImageStrengthRequestBodyVariant1 = value; } /// @@ -68,42 +68,42 @@ public ImageToImageUsingImageStrengthRequestBody(global::StabilityAI.ImageToImag /// /// /// - public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(ImageToImageUsingImageStrengthRequestBody @this) => @this.Value2; + public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(ImageToImageUsingImageStrengthRequestBody @this) => @this.GenerationOptionalParams; /// /// /// public ImageToImageUsingImageStrengthRequestBody(global::StabilityAI.GenerationRequestOptionalParams? value) { - Value2 = value; + GenerationOptionalParams = value; } /// /// /// public ImageToImageUsingImageStrengthRequestBody( - global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? value1, - global::StabilityAI.GenerationRequestOptionalParams? value2 + global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1? imageToImageUsingImageStrengthRequestBodyVariant1, + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams ) { - Value1 = value1; - Value2 = value2; + ImageToImageUsingImageStrengthRequestBodyVariant1 = imageToImageUsingImageStrengthRequestBodyVariant1; + GenerationOptionalParams = generationOptionalParams; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + GenerationOptionalParams as object ?? + ImageToImageUsingImageStrengthRequestBodyVariant1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + ImageToImageUsingImageStrengthRequestBodyVariant1?.ToString() ?? + GenerationOptionalParams?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsImageToImageUsingImageStrengthRequestBodyVariant1 && IsGenerationOptionalParams; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? imageToImageUsingImageStrengthRequestBodyVariant1 = null, + global::System.Func? generationOptionalParams = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsImageToImageUsingImageStrengthRequestBodyVariant1 && imageToImageUsingImageStrengthRequestBodyVariant1 != null) { - return value1(Value1!); + return imageToImageUsingImageStrengthRequestBodyVariant1(ImageToImageUsingImageStrengthRequestBodyVariant1!); } - else if (IsValue2 && value2 != null) + else if (IsGenerationOptionalParams && generationOptionalParams != null) { - return value2(Value2!); + return generationOptionalParams(GenerationOptionalParams!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? imageToImageUsingImageStrengthRequestBodyVariant1 = null, + global::System.Action? generationOptionalParams = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsImageToImageUsingImageStrengthRequestBodyVariant1) { - value1?.Invoke(Value1!); + imageToImageUsingImageStrengthRequestBodyVariant1?.Invoke(ImageToImageUsingImageStrengthRequestBodyVariant1!); } - else if (IsValue2) + else if (IsGenerationOptionalParams) { - value2?.Invoke(Value2!); + generationOptionalParams?.Invoke(GenerationOptionalParams!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ImageToImageUsingImageStrengthRequestBodyVariant1, typeof(global::StabilityAI.ImageToImageUsingImageStrengthRequestBodyVariant1), - Value2, + GenerationOptionalParams, typeof(global::StabilityAI.GenerationRequestOptionalParams), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ImageToImageUsingImageStrengthRequestBody other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageToImageUsingImageStrengthRequestBodyVariant1, other.ImageToImageUsingImageStrengthRequestBodyVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationOptionalParams, other.GenerationOptionalParams) ; } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingStepScheduleRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingStepScheduleRequestBody.g.cs index dd409f0..b881a3d 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingStepScheduleRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.Models.ImageToImageUsingStepScheduleRequestBody.g.cs @@ -13,35 +13,35 @@ namespace StabilityAI /// /// #if NET6_0_OR_GREATER - public global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? Value1 { get; init; } + public global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? ImageToImageUsingStepScheduleRequestBodyVariant1 { get; init; } #else - public global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? Value1 { get; } + public global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? ImageToImageUsingStepScheduleRequestBodyVariant1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageToImageUsingStepScheduleRequestBodyVariant1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsImageToImageUsingStepScheduleRequestBodyVariant1 => ImageToImageUsingStepScheduleRequestBodyVariant1 != null; /// /// Represents the optional parameters that can be passed to any generation request. /// #if NET6_0_OR_GREATER - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; init; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; init; } #else - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationOptionalParams))] #endif - public bool IsValue2 => Value2 != null; + public bool IsGenerationOptionalParams => GenerationOptionalParams != null; /// /// /// @@ -50,14 +50,14 @@ namespace StabilityAI /// /// /// - public static implicit operator global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1?(ImageToImageUsingStepScheduleRequestBody @this) => @this.Value1; + public static implicit operator global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1?(ImageToImageUsingStepScheduleRequestBody @this) => @this.ImageToImageUsingStepScheduleRequestBodyVariant1; /// /// /// public ImageToImageUsingStepScheduleRequestBody(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? value) { - Value1 = value; + ImageToImageUsingStepScheduleRequestBodyVariant1 = value; } /// @@ -68,42 +68,42 @@ public ImageToImageUsingStepScheduleRequestBody(global::StabilityAI.ImageToImage /// /// /// - public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(ImageToImageUsingStepScheduleRequestBody @this) => @this.Value2; + public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(ImageToImageUsingStepScheduleRequestBody @this) => @this.GenerationOptionalParams; /// /// /// public ImageToImageUsingStepScheduleRequestBody(global::StabilityAI.GenerationRequestOptionalParams? value) { - Value2 = value; + GenerationOptionalParams = value; } /// /// /// public ImageToImageUsingStepScheduleRequestBody( - global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? value1, - global::StabilityAI.GenerationRequestOptionalParams? value2 + global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1? imageToImageUsingStepScheduleRequestBodyVariant1, + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams ) { - Value1 = value1; - Value2 = value2; + ImageToImageUsingStepScheduleRequestBodyVariant1 = imageToImageUsingStepScheduleRequestBodyVariant1; + GenerationOptionalParams = generationOptionalParams; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + GenerationOptionalParams as object ?? + ImageToImageUsingStepScheduleRequestBodyVariant1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + ImageToImageUsingStepScheduleRequestBodyVariant1?.ToString() ?? + GenerationOptionalParams?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsImageToImageUsingStepScheduleRequestBodyVariant1 && IsGenerationOptionalParams; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? imageToImageUsingStepScheduleRequestBodyVariant1 = null, + global::System.Func? generationOptionalParams = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsImageToImageUsingStepScheduleRequestBodyVariant1 && imageToImageUsingStepScheduleRequestBodyVariant1 != null) { - return value1(Value1!); + return imageToImageUsingStepScheduleRequestBodyVariant1(ImageToImageUsingStepScheduleRequestBodyVariant1!); } - else if (IsValue2 && value2 != null) + else if (IsGenerationOptionalParams && generationOptionalParams != null) { - return value2(Value2!); + return generationOptionalParams(GenerationOptionalParams!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? imageToImageUsingStepScheduleRequestBodyVariant1 = null, + global::System.Action? generationOptionalParams = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsImageToImageUsingStepScheduleRequestBodyVariant1) { - value1?.Invoke(Value1!); + imageToImageUsingStepScheduleRequestBodyVariant1?.Invoke(ImageToImageUsingStepScheduleRequestBodyVariant1!); } - else if (IsValue2) + else if (IsGenerationOptionalParams) { - value2?.Invoke(Value2!); + generationOptionalParams?.Invoke(GenerationOptionalParams!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + ImageToImageUsingStepScheduleRequestBodyVariant1, typeof(global::StabilityAI.ImageToImageUsingStepScheduleRequestBodyVariant1), - Value2, + GenerationOptionalParams, typeof(global::StabilityAI.GenerationRequestOptionalParams), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ImageToImageUsingStepScheduleRequestBody other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageToImageUsingStepScheduleRequestBodyVariant1, other.ImageToImageUsingStepScheduleRequestBodyVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationOptionalParams, other.GenerationOptionalParams) ; } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingInitImageAlphaRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingInitImageAlphaRequestBody.g.cs index 73e6473..e6576d6 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingInitImageAlphaRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingInitImageAlphaRequestBody.g.cs @@ -13,35 +13,35 @@ namespace StabilityAI /// /// #if NET6_0_OR_GREATER - public global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? Value1 { get; init; } + public global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? MaskingUsingInitImageAlphaRequestBodyVariant1 { get; init; } #else - public global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? Value1 { get; } + public global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? MaskingUsingInitImageAlphaRequestBodyVariant1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaskingUsingInitImageAlphaRequestBodyVariant1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsMaskingUsingInitImageAlphaRequestBodyVariant1 => MaskingUsingInitImageAlphaRequestBodyVariant1 != null; /// /// Represents the optional parameters that can be passed to any generation request. /// #if NET6_0_OR_GREATER - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; init; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; init; } #else - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationOptionalParams))] #endif - public bool IsValue2 => Value2 != null; + public bool IsGenerationOptionalParams => GenerationOptionalParams != null; /// /// /// @@ -50,14 +50,14 @@ namespace StabilityAI /// /// /// - public static implicit operator global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1?(MaskingUsingInitImageAlphaRequestBody @this) => @this.Value1; + public static implicit operator global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1?(MaskingUsingInitImageAlphaRequestBody @this) => @this.MaskingUsingInitImageAlphaRequestBodyVariant1; /// /// /// public MaskingUsingInitImageAlphaRequestBody(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? value) { - Value1 = value; + MaskingUsingInitImageAlphaRequestBodyVariant1 = value; } /// @@ -68,42 +68,42 @@ public MaskingUsingInitImageAlphaRequestBody(global::StabilityAI.MaskingUsingIni /// /// /// - public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(MaskingUsingInitImageAlphaRequestBody @this) => @this.Value2; + public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(MaskingUsingInitImageAlphaRequestBody @this) => @this.GenerationOptionalParams; /// /// /// public MaskingUsingInitImageAlphaRequestBody(global::StabilityAI.GenerationRequestOptionalParams? value) { - Value2 = value; + GenerationOptionalParams = value; } /// /// /// public MaskingUsingInitImageAlphaRequestBody( - global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? value1, - global::StabilityAI.GenerationRequestOptionalParams? value2 + global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1? maskingUsingInitImageAlphaRequestBodyVariant1, + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams ) { - Value1 = value1; - Value2 = value2; + MaskingUsingInitImageAlphaRequestBodyVariant1 = maskingUsingInitImageAlphaRequestBodyVariant1; + GenerationOptionalParams = generationOptionalParams; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + GenerationOptionalParams as object ?? + MaskingUsingInitImageAlphaRequestBodyVariant1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + MaskingUsingInitImageAlphaRequestBodyVariant1?.ToString() ?? + GenerationOptionalParams?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsMaskingUsingInitImageAlphaRequestBodyVariant1 && IsGenerationOptionalParams; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? maskingUsingInitImageAlphaRequestBodyVariant1 = null, + global::System.Func? generationOptionalParams = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsMaskingUsingInitImageAlphaRequestBodyVariant1 && maskingUsingInitImageAlphaRequestBodyVariant1 != null) { - return value1(Value1!); + return maskingUsingInitImageAlphaRequestBodyVariant1(MaskingUsingInitImageAlphaRequestBodyVariant1!); } - else if (IsValue2 && value2 != null) + else if (IsGenerationOptionalParams && generationOptionalParams != null) { - return value2(Value2!); + return generationOptionalParams(GenerationOptionalParams!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? maskingUsingInitImageAlphaRequestBodyVariant1 = null, + global::System.Action? generationOptionalParams = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsMaskingUsingInitImageAlphaRequestBodyVariant1) { - value1?.Invoke(Value1!); + maskingUsingInitImageAlphaRequestBodyVariant1?.Invoke(MaskingUsingInitImageAlphaRequestBodyVariant1!); } - else if (IsValue2) + else if (IsGenerationOptionalParams) { - value2?.Invoke(Value2!); + generationOptionalParams?.Invoke(GenerationOptionalParams!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + MaskingUsingInitImageAlphaRequestBodyVariant1, typeof(global::StabilityAI.MaskingUsingInitImageAlphaRequestBodyVariant1), - Value2, + GenerationOptionalParams, typeof(global::StabilityAI.GenerationRequestOptionalParams), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MaskingUsingInitImageAlphaRequestBody other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaskingUsingInitImageAlphaRequestBodyVariant1, other.MaskingUsingInitImageAlphaRequestBodyVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationOptionalParams, other.GenerationOptionalParams) ; } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingMaskImageRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingMaskImageRequestBody.g.cs index 5c12034..684654b 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingMaskImageRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.Models.MaskingUsingMaskImageRequestBody.g.cs @@ -13,35 +13,35 @@ namespace StabilityAI /// /// #if NET6_0_OR_GREATER - public global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? Value1 { get; init; } + public global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? MaskingUsingMaskImageRequestBodyVariant1 { get; init; } #else - public global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? Value1 { get; } + public global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? MaskingUsingMaskImageRequestBodyVariant1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaskingUsingMaskImageRequestBodyVariant1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsMaskingUsingMaskImageRequestBodyVariant1 => MaskingUsingMaskImageRequestBodyVariant1 != null; /// /// Represents the optional parameters that can be passed to any generation request. /// #if NET6_0_OR_GREATER - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; init; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; init; } #else - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationOptionalParams))] #endif - public bool IsValue2 => Value2 != null; + public bool IsGenerationOptionalParams => GenerationOptionalParams != null; /// /// /// @@ -50,14 +50,14 @@ namespace StabilityAI /// /// /// - public static implicit operator global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1?(MaskingUsingMaskImageRequestBody @this) => @this.Value1; + public static implicit operator global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1?(MaskingUsingMaskImageRequestBody @this) => @this.MaskingUsingMaskImageRequestBodyVariant1; /// /// /// public MaskingUsingMaskImageRequestBody(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? value) { - Value1 = value; + MaskingUsingMaskImageRequestBodyVariant1 = value; } /// @@ -68,42 +68,42 @@ public MaskingUsingMaskImageRequestBody(global::StabilityAI.MaskingUsingMaskImag /// /// /// - public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(MaskingUsingMaskImageRequestBody @this) => @this.Value2; + public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(MaskingUsingMaskImageRequestBody @this) => @this.GenerationOptionalParams; /// /// /// public MaskingUsingMaskImageRequestBody(global::StabilityAI.GenerationRequestOptionalParams? value) { - Value2 = value; + GenerationOptionalParams = value; } /// /// /// public MaskingUsingMaskImageRequestBody( - global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? value1, - global::StabilityAI.GenerationRequestOptionalParams? value2 + global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1? maskingUsingMaskImageRequestBodyVariant1, + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams ) { - Value1 = value1; - Value2 = value2; + MaskingUsingMaskImageRequestBodyVariant1 = maskingUsingMaskImageRequestBodyVariant1; + GenerationOptionalParams = generationOptionalParams; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + GenerationOptionalParams as object ?? + MaskingUsingMaskImageRequestBodyVariant1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + MaskingUsingMaskImageRequestBodyVariant1?.ToString() ?? + GenerationOptionalParams?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsMaskingUsingMaskImageRequestBodyVariant1 && IsGenerationOptionalParams; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? maskingUsingMaskImageRequestBodyVariant1 = null, + global::System.Func? generationOptionalParams = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsMaskingUsingMaskImageRequestBodyVariant1 && maskingUsingMaskImageRequestBodyVariant1 != null) { - return value1(Value1!); + return maskingUsingMaskImageRequestBodyVariant1(MaskingUsingMaskImageRequestBodyVariant1!); } - else if (IsValue2 && value2 != null) + else if (IsGenerationOptionalParams && generationOptionalParams != null) { - return value2(Value2!); + return generationOptionalParams(GenerationOptionalParams!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? maskingUsingMaskImageRequestBodyVariant1 = null, + global::System.Action? generationOptionalParams = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsMaskingUsingMaskImageRequestBodyVariant1) { - value1?.Invoke(Value1!); + maskingUsingMaskImageRequestBodyVariant1?.Invoke(MaskingUsingMaskImageRequestBodyVariant1!); } - else if (IsValue2) + else if (IsGenerationOptionalParams) { - value2?.Invoke(Value2!); + generationOptionalParams?.Invoke(GenerationOptionalParams!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + MaskingUsingMaskImageRequestBodyVariant1, typeof(global::StabilityAI.MaskingUsingMaskImageRequestBodyVariant1), - Value2, + GenerationOptionalParams, typeof(global::StabilityAI.GenerationRequestOptionalParams), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MaskingUsingMaskImageRequestBody other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaskingUsingMaskImageRequestBodyVariant1, other.MaskingUsingMaskImageRequestBodyVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationOptionalParams, other.GenerationOptionalParams) ; } diff --git a/src/libs/StabilityAI/Generated/StabilityAI.Models.TextToImageRequestBody.g.cs b/src/libs/StabilityAI/Generated/StabilityAI.Models.TextToImageRequestBody.g.cs index 536572c..aee0b24 100644 --- a/src/libs/StabilityAI/Generated/StabilityAI.Models.TextToImageRequestBody.g.cs +++ b/src/libs/StabilityAI/Generated/StabilityAI.Models.TextToImageRequestBody.g.cs @@ -13,35 +13,35 @@ namespace StabilityAI /// /// #if NET6_0_OR_GREATER - public global::StabilityAI.TextToImageRequestBodyVariant1? Value1 { get; init; } + public global::StabilityAI.TextToImageRequestBodyVariant1? TextToImageRequestBodyVariant1 { get; init; } #else - public global::StabilityAI.TextToImageRequestBodyVariant1? Value1 { get; } + public global::StabilityAI.TextToImageRequestBodyVariant1? TextToImageRequestBodyVariant1 { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextToImageRequestBodyVariant1))] #endif - public bool IsValue1 => Value1 != null; + public bool IsTextToImageRequestBodyVariant1 => TextToImageRequestBodyVariant1 != null; /// /// Represents the optional parameters that can be passed to any generation request. /// #if NET6_0_OR_GREATER - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; init; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; init; } #else - public global::StabilityAI.GenerationRequestOptionalParams? Value2 { get; } + public global::StabilityAI.GenerationRequestOptionalParams? GenerationOptionalParams { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationOptionalParams))] #endif - public bool IsValue2 => Value2 != null; + public bool IsGenerationOptionalParams => GenerationOptionalParams != null; /// /// /// @@ -50,14 +50,14 @@ namespace StabilityAI /// /// /// - public static implicit operator global::StabilityAI.TextToImageRequestBodyVariant1?(TextToImageRequestBody @this) => @this.Value1; + public static implicit operator global::StabilityAI.TextToImageRequestBodyVariant1?(TextToImageRequestBody @this) => @this.TextToImageRequestBodyVariant1; /// /// /// public TextToImageRequestBody(global::StabilityAI.TextToImageRequestBodyVariant1? value) { - Value1 = value; + TextToImageRequestBodyVariant1 = value; } /// @@ -68,42 +68,42 @@ public TextToImageRequestBody(global::StabilityAI.TextToImageRequestBodyVariant1 /// /// /// - public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(TextToImageRequestBody @this) => @this.Value2; + public static implicit operator global::StabilityAI.GenerationRequestOptionalParams?(TextToImageRequestBody @this) => @this.GenerationOptionalParams; /// /// /// public TextToImageRequestBody(global::StabilityAI.GenerationRequestOptionalParams? value) { - Value2 = value; + GenerationOptionalParams = value; } /// /// /// public TextToImageRequestBody( - global::StabilityAI.TextToImageRequestBodyVariant1? value1, - global::StabilityAI.GenerationRequestOptionalParams? value2 + global::StabilityAI.TextToImageRequestBodyVariant1? textToImageRequestBodyVariant1, + global::StabilityAI.GenerationRequestOptionalParams? generationOptionalParams ) { - Value1 = value1; - Value2 = value2; + TextToImageRequestBodyVariant1 = textToImageRequestBodyVariant1; + GenerationOptionalParams = generationOptionalParams; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + GenerationOptionalParams as object ?? + TextToImageRequestBodyVariant1 as object ; /// /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + TextToImageRequestBodyVariant1?.ToString() ?? + GenerationOptionalParams?.ToString() ; /// @@ -111,15 +111,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsTextToImageRequestBodyVariant1 && IsGenerationOptionalParams; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? textToImageRequestBodyVariant1 = null, + global::System.Func? generationOptionalParams = null, bool validate = true) { if (validate) @@ -127,13 +127,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsTextToImageRequestBodyVariant1 && textToImageRequestBodyVariant1 != null) { - return value1(Value1!); + return textToImageRequestBodyVariant1(TextToImageRequestBodyVariant1!); } - else if (IsValue2 && value2 != null) + else if (IsGenerationOptionalParams && generationOptionalParams != null) { - return value2(Value2!); + return generationOptionalParams(GenerationOptionalParams!); } return default(TResult); @@ -143,8 +143,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? textToImageRequestBodyVariant1 = null, + global::System.Action? generationOptionalParams = null, bool validate = true) { if (validate) @@ -152,13 +152,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsTextToImageRequestBodyVariant1) { - value1?.Invoke(Value1!); + textToImageRequestBodyVariant1?.Invoke(TextToImageRequestBodyVariant1!); } - else if (IsValue2) + else if (IsGenerationOptionalParams) { - value2?.Invoke(Value2!); + generationOptionalParams?.Invoke(GenerationOptionalParams!); } } @@ -169,9 +169,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + TextToImageRequestBodyVariant1, typeof(global::StabilityAI.TextToImageRequestBodyVariant1), - Value2, + GenerationOptionalParams, typeof(global::StabilityAI.GenerationRequestOptionalParams), }; const int offset = unchecked((int)2166136261); @@ -189,8 +189,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(TextToImageRequestBody other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextToImageRequestBodyVariant1, other.TextToImageRequestBodyVariant1) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationOptionalParams, other.GenerationOptionalParams) ; }