diff --git a/src/libs/AutoSDK/Models/AnyOfData.cs b/src/libs/AutoSDK/Models/AnyOfData.cs index 97e3c0356d..8045139563 100644 --- a/src/libs/AutoSDK/Models/AnyOfData.cs +++ b/src/libs/AutoSDK/Models/AnyOfData.cs @@ -10,7 +10,6 @@ public readonly record struct AnyOfData( int Count, TypeData? DiscriminatorType, string? DiscriminatorPropertyName, - //EquatableArray<(string, string)>? DiscriminatorMapping, bool IsTrimming, string Namespace, string Name, @@ -19,6 +18,8 @@ public readonly record struct AnyOfData( Settings Settings ) { + public bool IsNamed => !string.IsNullOrWhiteSpace(Name); + public static AnyOfData FromSchemaContext(SchemaContext context) { context = context ?? throw new ArgumentNullException(nameof(context)); @@ -33,26 +34,55 @@ public static AnyOfData FromSchemaContext(SchemaContext context) var className = context.Id.ToClassName(); TypeData? discriminatorType = null; string? discriminatorPropertyName = null; - //IDictionary? discriminatorMapping = null; if (context.Schema.Discriminator != null && context.Schema.Discriminator.Mapping.Count != 0) { discriminatorType = context.Children.FirstOrDefault(x => x.Hint == Hint.Discriminator)?.TypeData; discriminatorPropertyName = context.Schema.Discriminator.PropertyName.ToPropertyName(); - - // if (context.Schema.Discriminator.Mapping.Count == 0) - // { - // if (children.All(x => - // x.Children.FirstOrDefault(y => y.PropertyName == discriminatorPropertyName)?.GetDefaultValue() != null && - // x.ClassName != null)) - // { - // context.Schema.Discriminator.Mapping = children - // .ToDictionary( - // x => x.GetDefaultValue()!, - // x => x.ClassName); - // } - // } + } + + var count = context.IsAnyOf + ? context.Schema.AnyOf.Count + : context.IsOneOf + ? context.Schema.OneOf.Count + : context.Schema.AllOf.Count; + var properties = context.IsNamedAnyOfLike + ? children.Select((x, i) => PropertyData.Default with + { + Type = x.TypeData, + Name = SmartNamedAnyOfNames.ComputePropertyName(children, className, i), + Summary = x.Schema.GetSummary(), + DiscriminatorValue = context.Schema.Discriminator?.Mapping? + .FirstOrDefault(y => + y.Value.Contains(x.Id) || + (x.Schema.Properties.ContainsKey(context.Schema.Discriminator.PropertyName) && + x.Schema.Properties[context.Schema.Discriminator.PropertyName].Enum.Count == 1 && + x.Schema.Properties[context.Schema.Discriminator.PropertyName].Enum.FirstOrDefault() + ?.GetString() == y.Key)) + .Key?.ToEnumValue(string.Empty, context.Settings).Name ?? string.Empty, + }).ToImmutableArray().AsEquatableArray() + : Enumerable + .Range(1, count) + .Select(i => PropertyData.Default with + { + Name = $"Value{i}", + Type = TypeData.Default with + { + CSharpTypeRaw = $"T{i}", + }, + }) + .ToImmutableArray().AsEquatableArray(); + if (context.IsNamedAnyOfLike && + !properties.IsEmpty && + properties.All(x => !string.IsNullOrWhiteSpace(x.DiscriminatorValue))) + { + properties = properties + .Select(x => x with + { + Name = x.DiscriminatorValue, + }) + .ToImmutableArray().AsEquatableArray(); } return new AnyOfData( @@ -61,16 +91,9 @@ public static AnyOfData FromSchemaContext(SchemaContext context) : context.IsOneOf ? "OneOf" : "AllOf", - Count: context.IsAnyOf - ? context.Schema.AnyOf.Count - : context.IsOneOf - ? context.Schema.OneOf.Count - : context.Schema.AllOf.Count, + Count: count, DiscriminatorType: discriminatorType, DiscriminatorPropertyName: discriminatorPropertyName, - //DiscriminatorMapping: discriminatorMapping? - // .Select(x => (x.Key, x.Value)) - // .ToImmutableArray(), IsTrimming: context.Settings.JsonSerializerType == JsonSerializerType.SystemTextJson && (!string.IsNullOrWhiteSpace(context.Settings.JsonSerializerContext) || @@ -82,25 +105,7 @@ public static AnyOfData FromSchemaContext(SchemaContext context) Summary: context.IsNamedAnyOfLike ? context.Schema.GetSummary() : string.Empty, - Properties: context.IsNamedAnyOfLike - ? children.Select((x, i) => PropertyData.Default with - { - Type = x.TypeData, - Name = SmartNamedAnyOfNames.ShouldUseSmartName(children, className) - ? SmartNamedAnyOfNames.ComputeSmartName( - x.TypeData, - className) - : $"Value{i + 1}", - Summary = x.Schema.GetSummary(), - DiscriminatorValue = context.Schema.Discriminator?.Mapping? - .FirstOrDefault(y => - y.Value.Contains(x.Id) || - (x.Schema.Properties.ContainsKey(context.Schema.Discriminator.PropertyName) && - x.Schema.Properties[context.Schema.Discriminator.PropertyName].Enum.Count == 1 && - x.Schema.Properties[context.Schema.Discriminator.PropertyName].Enum.FirstOrDefault()?.GetString() == y.Key)) - .Key?.ToEnumValue(string.Empty, context.Settings).Name ?? string.Empty, - }).ToImmutableArray() - : ImmutableArray.Empty, + Properties: properties, Settings: context.Settings); } } \ No newline at end of file diff --git a/src/libs/AutoSDK/Models/PropertyData.cs b/src/libs/AutoSDK/Models/PropertyData.cs index 6979eb8b7c..467882b31d 100644 --- a/src/libs/AutoSDK/Models/PropertyData.cs +++ b/src/libs/AutoSDK/Models/PropertyData.cs @@ -240,17 +240,4 @@ internal static string HandleWordSeparators(string name) .ReplaceIfEquals("void", "@void") .ReplaceIfEquals("volatile", "@volatile") .ReplaceIfEquals("while", "@while"); - - public string ArgumentName - { - get - { - if (Type.EnumValues.Length != 0 && Settings.JsonSerializerType == JsonSerializerType.NewtonsoftJson) - { - return ParameterName + "Value"; - } - - return ParameterName; - } - } } \ No newline at end of file diff --git a/src/libs/AutoSDK/Naming/AnyOfs/SmartNamedAnyOfNames.cs b/src/libs/AutoSDK/Naming/AnyOfs/SmartNamedAnyOfNames.cs index 218b96d2e5..a8ff5b7a00 100644 --- a/src/libs/AutoSDK/Naming/AnyOfs/SmartNamedAnyOfNames.cs +++ b/src/libs/AutoSDK/Naming/AnyOfs/SmartNamedAnyOfNames.cs @@ -4,6 +4,15 @@ namespace AutoSDK.Naming.AnyOfs; public static class SmartNamedAnyOfNames { + public static string ComputePropertyName(IList children, string className, int i) + { + return ShouldUseSmartName(children, className) + ? ComputeSmartName( + children.ElementAt(i).TypeData, + className) + : $"Value{i + 1}"; + } + public static bool ShouldUseSmartName(IList children, string className) { return children.All(x => diff --git a/src/libs/AutoSDK/Sources/Sources.AnyOf.cs b/src/libs/AutoSDK/Sources/Sources.AnyOf.cs index 04899def7a..1a663956df 100644 --- a/src/libs/AutoSDK/Sources/Sources.AnyOf.cs +++ b/src/libs/AutoSDK/Sources/Sources.AnyOf.cs @@ -1,4 +1,3 @@ -using System.Collections.Immutable; using AutoSDK.Extensions; using AutoSDK.Models; @@ -11,67 +10,54 @@ public static string GenerateAnyOf( CancellationToken cancellationToken = default) { var types = $"<{string.Join(", ", Enumerable.Range(1, anyOfData.Count).Select(x => $"T{x}"))}>"; - var classNameWithoutTypes = string.IsNullOrWhiteSpace(anyOfData.Name) + var classNameWithoutTypes = !anyOfData.IsNamed ? $"{anyOfData.SubType}" : anyOfData.Name; - var className = string.IsNullOrWhiteSpace(anyOfData.Name) + var className = !anyOfData.IsNamed ? $"{anyOfData.SubType}{types}" : anyOfData.Name; - var allTypes = anyOfData.Properties.IsEmpty - ? Enumerable - .Range(1, anyOfData.Count) - .Select(i => PropertyData.Default with - { - Name = $"Value{i}", - Type = TypeData.Default with - { - CSharpTypeRaw = $"T{i}", - }, - }) - .ToImmutableArray().AsEquatableArray() - : anyOfData.Properties; var validation = anyOfData.SubType switch { - "AnyOf" => string.Join(" || ", allTypes.Select(x => $"Is{x.Name}")), - "OneOf" => string.Join(" || ", allTypes.Select((x, xi) => - string.Join(" && ", allTypes.Select((y, yi) => $"{(yi == xi ? "" : "!")}Is{y.Name}")))), - "AllOf" => string.Join(" && ", allTypes.Select(x => $"Is{x.Name}")), + "AnyOf" => string.Join(" || ", anyOfData.Properties.Select(x => $"Is{x.Name}")), + "OneOf" => string.Join(" || ", anyOfData.Properties.Select((x, xi) => + string.Join(" && ", anyOfData.Properties.Select((y, yi) => $"{(yi == xi ? "" : "!")}Is{y.Name}")))), + "AllOf" => string.Join(" && ", anyOfData.Properties.Select(x => $"Is{x.Name}")), _ => throw new NotImplementedException(), }; var constructorWithAllValues = anyOfData.Count > 1 || - (!string.IsNullOrWhiteSpace(anyOfData.Name) && + (anyOfData.IsNamed && anyOfData.DiscriminatorType != null && anyOfData.DiscriminatorPropertyName != null && - allTypes.All(x => !string.IsNullOrWhiteSpace(x.DiscriminatorValue))) ? $@" + anyOfData.Properties.All(x => !string.IsNullOrWhiteSpace(x.DiscriminatorValue))) ? $@" {string.Empty.ToXmlDocumentationSummary(level: 8)} public {classNameWithoutTypes}( -{(string.IsNullOrWhiteSpace(anyOfData.Name) || +{(!anyOfData.IsNamed || anyOfData.DiscriminatorType == null || anyOfData.DiscriminatorPropertyName == null || - allTypes.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" + anyOfData.Properties.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" {anyOfData.DiscriminatorType.Value.CSharpTypeWithoutNullability}{anyOfData.DiscriminatorPropertyName}? {anyOfData.DiscriminatorPropertyName.ToParameterName()}, ")} -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.Type.CSharpTypeWithNullability} {x.ParameterName}, ").Inject().TrimEnd(',', '\n')} ) {{ -{(string.IsNullOrWhiteSpace(anyOfData.Name) || +{(!anyOfData.IsNamed || anyOfData.DiscriminatorType == null || anyOfData.DiscriminatorPropertyName == null || - allTypes.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" + anyOfData.Properties.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" {anyOfData.DiscriminatorPropertyName} = {anyOfData.DiscriminatorPropertyName.ToParameterName()}; ")} -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.Name} = {x.ParameterName}; ").Inject()} }}" : " "; var json = GenerateFromToJsonMethods(anyOfData.Namespace, className, anyOfData.Settings, isValueType: true, cancellationToken); return $@"using System.Linq; -{(anyOfData.Properties.IsEmpty ? "" : @"#pragma warning disable CS0618 // Type or member is obsolete -")} +{(anyOfData.IsNamed ? @"#pragma warning disable CS0618 // Type or member is obsolete +" : "")} #nullable enable namespace {anyOfData.Namespace} @@ -79,14 +65,14 @@ namespace {anyOfData.Namespace} {anyOfData.Summary.ToXmlDocumentationSummary(level: 4)} public readonly partial struct {className} : global::System.IEquatable<{className}> {{ -{(string.IsNullOrWhiteSpace(anyOfData.Name) || +{(!anyOfData.IsNamed || anyOfData.DiscriminatorType == null || anyOfData.DiscriminatorPropertyName == null || - allTypes.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" + anyOfData.Properties.Any(x => string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? " " : $@" {string.Empty.ToXmlDocumentationSummary(level: 8)} public {anyOfData.DiscriminatorType.Value.CSharpTypeWithoutNullability}{anyOfData.DiscriminatorPropertyName}? {anyOfData.DiscriminatorPropertyName} {{ get; }} ")} -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.Summary.ToXmlDocumentationSummary(level: 8)} #if NET6_0_OR_GREATER public {x.Type.CSharpTypeWithNullability} {x.Name} {{ get; init; }} @@ -117,7 +103,7 @@ namespace {anyOfData.Namespace} {string.Empty.ToXmlDocumentationSummary(level: 8)} public object? Object => -{allTypes.Reverse().Select(x => $@" +{anyOfData.Properties.Reverse().Select(x => $@" {x.Name} as object ?? ").Inject().TrimEnd('?', '\n')} ; @@ -130,7 +116,7 @@ public bool Validate() {string.Empty.ToXmlDocumentationSummary(level: 8)} public TResult? Match( -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" global::System.Func<{x.Type.CSharpType}, TResult>? {x.ParameterName} = null, ").Inject()} bool validate = true) @@ -140,7 +126,7 @@ public bool Validate() Validate(); }} -{allTypes.Select((x, i) => $@" +{anyOfData.Properties.Select((x, i) => $@" {(i > 0 ? "else " : "")}if (Is{x.Name} && {x.ParameterName} != null) {{ return {x.ParameterName}({x.Name}!); @@ -151,7 +137,7 @@ public bool Validate() {string.Empty.ToXmlDocumentationSummary(level: 8)} public void Match( -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" global::System.Action<{x.Type.CSharpType}>? {x.ParameterName} = null, ").Inject()} bool validate = true) @@ -161,7 +147,7 @@ public void Match( Validate(); }} -{allTypes.Select((x, i) => $@" +{anyOfData.Properties.Select((x, i) => $@" {(i > 0 ? "else " : "")}if (Is{x.Name}) {{ {x.ParameterName}?.Invoke({x.Name}!); @@ -173,7 +159,7 @@ public override int GetHashCode() {{ var fields = new object?[] {{ -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.Name}, typeof({x.Type.CSharpTypeWithoutNullability}), ").Inject()} @@ -193,7 +179,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals({className} other) {{ return -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" global::System.Collections.Generic.EqualityComparer<{x.Type.CSharpTypeWithNullability}>.Default.Equals({x.Name}, other.{x.Name}) && ").Inject().TrimEnd('&', '\n')} ; diff --git a/src/libs/AutoSDK/Sources/Sources.JsonConverters.AnyOf.cs b/src/libs/AutoSDK/Sources/Sources.JsonConverters.AnyOf.cs index fd4f8e5268..e4fbdd80c9 100644 --- a/src/libs/AutoSDK/Sources/Sources.JsonConverters.AnyOf.cs +++ b/src/libs/AutoSDK/Sources/Sources.JsonConverters.AnyOf.cs @@ -1,4 +1,3 @@ -using System.Collections.Immutable; using AutoSDK.Extensions; using AutoSDK.Models; using AutoSDK.Serialization.Json; @@ -17,26 +16,13 @@ public static string GenerateAnyOfJsonConverter( } var types = $"<{string.Join(", ", Enumerable.Range(1, anyOfData.Count).Select(x => $"T{x}"))}>"; - var classNameWithTypes = string.IsNullOrWhiteSpace(anyOfData.Name) + var classNameWithTypes = !anyOfData.IsNamed ? $"{anyOfData.SubType}JsonConverter{types}" : $"{anyOfData.Name}JsonConverter"; - var typeNameWithTypes = string.IsNullOrWhiteSpace(anyOfData.Name) + var typeNameWithTypes = !anyOfData.IsNamed ? $"global::{anyOfData.Namespace}.{anyOfData.SubType}{types}" : $"global::{anyOfData.Namespace}.{anyOfData.Name}"; - var allTypes = anyOfData.Properties.IsEmpty - ? Enumerable - .Range(1, anyOfData.Count) - .Select(i => PropertyData.Default with - { - Name = $"Value{i}", - Type = TypeData.Default with - { - CSharpTypeRaw = $"T{i}", - }, - }) - .ToImmutableArray().AsEquatableArray() - : anyOfData.Properties; - var read = anyOfData.DiscriminatorType != null && allTypes.All(x => !string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? $@" + var read = anyOfData.DiscriminatorType != null && anyOfData.Properties.All(x => !string.IsNullOrWhiteSpace(x.DiscriminatorValue)) ? $@" var readerCopy = reader; {(anyOfData.IsTrimming ? $@" @@ -47,7 +33,7 @@ public static string GenerateAnyOfJsonConverter( var discriminator = global::System.Text.Json.JsonSerializer.Deserialize<{anyOfData.DiscriminatorType.Value.CSharpTypeWithoutNullability}>(ref readerCopy, options); ")} -{allTypes.Select((x, i) => $@" +{anyOfData.Properties.Select((x, i) => $@" {x.Type.CSharpTypeWithNullability} {x.ParameterName} = default; if (discriminator?.{anyOfData.DiscriminatorPropertyName} == {anyOfData.DiscriminatorType.Value.CSharpTypeWithoutNullability}{anyOfData.DiscriminatorPropertyName}.{x.DiscriminatorValue}) {{ @@ -63,17 +49,17 @@ public static string GenerateAnyOfJsonConverter( var result = new {typeNameWithTypes}( discriminator?.{anyOfData.DiscriminatorPropertyName}, -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.ParameterName}, ").Inject().TrimEnd(',')} ); {(anyOfData.Settings.ValidateAnyOfs ? @$" if (!result.Validate()) {{ - throw new global::System.Text.Json.JsonException($""Invalid JSON format for {anyOfData.SubType}<{string.Join(", ", allTypes.Select(x => $"{{nameof({x.Type.CSharpTypeWithoutNullability})}}"))}>""); + throw new global::System.Text.Json.JsonException($""Invalid JSON format for {anyOfData.SubType}<{string.Join(", ", anyOfData.Properties.Select(x => $"{{nameof({x.Type.CSharpTypeWithoutNullability})}}"))}>""); }}" : " ")}" : $@" var -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" readerCopy = reader; {x.Type.CSharpTypeWithNullability} {x.ParameterName} = default; try @@ -92,17 +78,17 @@ public static string GenerateAnyOfJsonConverter( ").Inject()} var result = new {typeNameWithTypes}( -{allTypes.Select(x => $@" +{anyOfData.Properties.Select(x => $@" {x.ParameterName}, ").Inject().TrimEnd(',')} ); {(anyOfData.Settings.ValidateAnyOfs ? @$" if (!result.Validate()) {{ - throw new global::System.Text.Json.JsonException($""Invalid JSON format for {anyOfData.SubType}<{string.Join(", ", allTypes.Select(x => $"{{typeof({x.Type.CSharpTypeWithoutNullability}).Name}}"))}>""); + throw new global::System.Text.Json.JsonException($""Invalid JSON format for {anyOfData.SubType}<{string.Join(", ", anyOfData.Properties.Select(x => $"{{typeof({x.Type.CSharpTypeWithoutNullability}).Name}}"))}>""); }}" : " ")} -{allTypes.Select((x, i) => $@" +{anyOfData.Properties.Select((x, i) => $@" {(i == 0 ? "" : "else ")}if ({x.ParameterName} != null) {{ {(anyOfData.IsTrimming ? $@" @@ -116,8 +102,8 @@ public static string GenerateAnyOfJsonConverter( ").Inject().TrimEnd(',')}"; return $@"#nullable enable -{(anyOfData.Properties.IsEmpty ? "" : @"#pragma warning disable CS0618 // Type or member is obsolete -")} +{(anyOfData.IsNamed ? @"#pragma warning disable CS0618 // Type or member is obsolete +" : "")} namespace {anyOfData.Namespace}.JsonConverters {{ /// @@ -149,10 +135,10 @@ public override void Write( if (!value.Validate()) {{ - throw new global::System.Text.Json.JsonException($""Invalid {anyOfData.SubType}<{string.Join(", ", allTypes.Select(x => $"{{typeof({x.Type.CSharpTypeWithoutNullability}).Name}}"))}> object.""); + throw new global::System.Text.Json.JsonException($""Invalid {anyOfData.SubType}<{string.Join(", ", anyOfData.Properties.Select(x => $"{{typeof({x.Type.CSharpTypeWithoutNullability}).Name}}"))}> object.""); }}" : " ")} -{allTypes.Select((x, i) => $@" +{anyOfData.Properties.Select((x, i) => $@" {(i == 0 ? "" : "else ")}if (value.Is{x.Name}) {{ {(anyOfData.IsTrimming ? $@" @@ -174,7 +160,7 @@ public static string GenerateAnyOfJsonConverterFactory( CancellationToken cancellationToken = default) { if (anyOfData.Settings.JsonSerializerType == JsonSerializerType.NewtonsoftJson || - !anyOfData.Properties.IsEmpty) + anyOfData.IsNamed) { return string.Empty; } diff --git a/src/libs/AutoSDK/Sources/Sources.cs b/src/libs/AutoSDK/Sources/Sources.cs index e6dc2cb4d4..90f682b37e 100644 --- a/src/libs/AutoSDK/Sources/Sources.cs +++ b/src/libs/AutoSDK/Sources/Sources.cs @@ -90,7 +90,7 @@ public static FileWithName AnyOfJsonConverterFactory( CancellationToken cancellationToken = default) { if (anyOf.Settings.JsonSerializerType == JsonSerializerType.NewtonsoftJson || - !anyOf.Properties.IsEmpty) + anyOf.IsNamed) { return FileWithName.Empty; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs index 473c25ff75..d33920212f 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.User; /// /// /// public MessagesItem(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.Assistant; /// /// /// public MessagesItem(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -111,32 +111,32 @@ public MessagesItem(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.Tool; /// /// /// public MessagesItem(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.SystemMessage? SystemMessage { get; init; } + public global::G.SystemMessage? System { get; init; } #else - public global::G.SystemMessage? SystemMessage { get; } + public global::G.SystemMessage? System { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(System))] #endif - public bool IsSystemMessage => SystemMessage != null; + public bool IsSystem => System != null; /// /// @@ -146,14 +146,14 @@ public MessagesItem(global::G.ToolMessage? value) /// /// /// - public static implicit operator global::G.SystemMessage?(MessagesItem @this) => @this.SystemMessage; + public static implicit operator global::G.SystemMessage?(MessagesItem @this) => @this.System; /// /// /// public MessagesItem(global::G.SystemMessage? value) { - SystemMessage = value; + System = value; } /// @@ -161,28 +161,28 @@ public MessagesItem(global::G.SystemMessage? value) /// public MessagesItem( global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? role, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage, - global::G.SystemMessage? systemMessage + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool, + global::G.SystemMessage? system ) { Role = role; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; - SystemMessage = systemMessage; + User = user; + Assistant = assistant; + Tool = tool; + System = system; } /// /// /// public object? Object => - SystemMessage as object ?? - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object + System as object ?? + Tool as object ?? + Assistant as object ?? + User as object ; /// @@ -190,17 +190,17 @@ UserMessage as object /// public bool Validate() { - return IsUserMessage && !IsAssistantMessage && !IsToolMessage && !IsSystemMessage || !IsUserMessage && IsAssistantMessage && !IsToolMessage && !IsSystemMessage || !IsUserMessage && !IsAssistantMessage && IsToolMessage && !IsSystemMessage || !IsUserMessage && !IsAssistantMessage && !IsToolMessage && IsSystemMessage; + return IsUser && !IsAssistant && !IsTool && !IsSystem || !IsUser && IsAssistant && !IsTool && !IsSystem || !IsUser && !IsAssistant && IsTool && !IsSystem || !IsUser && !IsAssistant && !IsTool && IsSystem; } /// /// /// public TResult? Match( - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, - global::System.Func? systemMessage = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, + global::System.Func? system = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsUserMessage && userMessage != null) + if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } - else if (IsSystemMessage && systemMessage != null) + else if (IsSystem && system != null) { - return systemMessage(SystemMessage!); + return system(System!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, - global::System.Action? systemMessage = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, + global::System.Action? system = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsUserMessage) + if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } - else if (IsSystemMessage) + else if (IsSystem) { - systemMessage?.Invoke(SystemMessage!); + system?.Invoke(System!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), - SystemMessage, + System, typeof(global::G.SystemMessage), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(System, other.System) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs index 885fdcde69..0ac5f35672 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.User; /// /// /// public MessagesItem(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.Assistant; /// /// /// public MessagesItem(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -111,32 +111,32 @@ public MessagesItem(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.Tool; /// /// /// public MessagesItem(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.SystemMessage? SystemMessage { get; init; } + public global::G.SystemMessage? System { get; init; } #else - public global::G.SystemMessage? SystemMessage { get; } + public global::G.SystemMessage? System { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(System))] #endif - public bool IsSystemMessage => SystemMessage != null; + public bool IsSystem => System != null; /// /// @@ -146,14 +146,14 @@ public MessagesItem(global::G.ToolMessage? value) /// /// /// - public static implicit operator global::G.SystemMessage?(MessagesItem @this) => @this.SystemMessage; + public static implicit operator global::G.SystemMessage?(MessagesItem @this) => @this.System; /// /// /// public MessagesItem(global::G.SystemMessage? value) { - SystemMessage = value; + System = value; } /// @@ -161,28 +161,28 @@ public MessagesItem(global::G.SystemMessage? value) /// public MessagesItem( global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole? role, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage, - global::G.SystemMessage? systemMessage + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool, + global::G.SystemMessage? system ) { Role = role; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; - SystemMessage = systemMessage; + User = user; + Assistant = assistant; + Tool = tool; + System = system; } /// /// /// public object? Object => - SystemMessage as object ?? - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object + System as object ?? + Tool as object ?? + Assistant as object ?? + User as object ; /// @@ -190,17 +190,17 @@ UserMessage as object /// public bool Validate() { - return IsUserMessage && !IsAssistantMessage && !IsToolMessage && !IsSystemMessage || !IsUserMessage && IsAssistantMessage && !IsToolMessage && !IsSystemMessage || !IsUserMessage && !IsAssistantMessage && IsToolMessage && !IsSystemMessage || !IsUserMessage && !IsAssistantMessage && !IsToolMessage && IsSystemMessage; + return IsUser && !IsAssistant && !IsTool && !IsSystem || !IsUser && IsAssistant && !IsTool && !IsSystem || !IsUser && !IsAssistant && IsTool && !IsSystem || !IsUser && !IsAssistant && !IsTool && IsSystem; } /// /// /// public TResult? Match( - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, - global::System.Func? systemMessage = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, + global::System.Func? system = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsUserMessage && userMessage != null) + if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } - else if (IsSystemMessage && systemMessage != null) + else if (IsSystem && system != null) { - return systemMessage(SystemMessage!); + return system(System!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, - global::System.Action? systemMessage = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, + global::System.Action? system = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsUserMessage) + if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } - else if (IsSystemMessage) + else if (IsSystem) { - systemMessage?.Invoke(SystemMessage!); + system?.Invoke(System!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), - SystemMessage, + System, typeof(global::G.SystemMessage), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(System, other.System) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs index 0439763a0e..1f228a673f 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Ai21/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs @@ -22,41 +22,41 @@ public class MessagesItemJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.UserMessage? userMessage = default; + global::G.UserMessage? user = default; if (discriminator?.Role == global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.User) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.UserMessage)}"); - userMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + user = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantMessage? assistantMessage = default; + global::G.AssistantMessage? assistant = default; if (discriminator?.Role == global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Assistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantMessage)}"); - assistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ToolMessage? toolMessage = default; + global::G.ToolMessage? tool = default; if (discriminator?.Role == global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.Tool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ToolMessage)}"); - toolMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.SystemMessage? systemMessage = default; + global::G.SystemMessage? system = default; if (discriminator?.Role == global::G.LanguageStudioApiServerDataTypesChatChatRequestMessageDiscriminatorRole.System) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.SystemMessage)}"); - systemMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + system = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.MessagesItem( discriminator?.Role, - userMessage, - assistantMessage, - toolMessage, - systemMessage + user, + assistant, + tool, + system ); return result; @@ -71,29 +71,29 @@ 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.IsUserMessage) + if (value.IsUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.UserMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeInfo); } - else if (value.IsAssistantMessage) + else if (value.IsAssistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeInfo); } - else if (value.IsToolMessage) + else if (value.IsTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ToolMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeInfo); } - else if (value.IsSystemMessage) + else if (value.IsSystem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.SystemMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.BlockDelta.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.BlockDelta.g.verified.cs index 761d561f45..73711c6be2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.BlockDelta.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.BlockDelta.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A delta in a streaming text block. /// #if NET6_0_OR_GREATER - public global::G.TextBlockDelta? Text { get; init; } + public global::G.TextBlockDelta? TextDelta { get; init; } #else - public global::G.TextBlockDelta? Text { get; } + public global::G.TextBlockDelta? TextDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextDelta))] #endif - public bool IsText => Text != null; + public bool IsTextDelta => TextDelta != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.TextBlockDelta?(BlockDelta @this) => @this.Text; + public static implicit operator global::G.TextBlockDelta?(BlockDelta @this) => @this.TextDelta; /// /// /// public BlockDelta(global::G.TextBlockDelta? value) { - Text = value; + TextDelta = value; } /// /// A delta in a streaming input JSON. /// #if NET6_0_OR_GREATER - public global::G.InputJsonBlockDelta? InputJson { get; init; } + public global::G.InputJsonBlockDelta? InputJsonDelta { get; init; } #else - public global::G.InputJsonBlockDelta? InputJson { get; } + public global::G.InputJsonBlockDelta? InputJsonDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJson))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJsonDelta))] #endif - public bool IsInputJson => InputJson != null; + public bool IsInputJsonDelta => InputJsonDelta != null; /// /// @@ -76,14 +76,14 @@ public BlockDelta(global::G.TextBlockDelta? value) /// /// /// - public static implicit operator global::G.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJson; + public static implicit operator global::G.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJsonDelta; /// /// /// public BlockDelta(global::G.InputJsonBlockDelta? value) { - InputJson = value; + InputJsonDelta = value; } /// @@ -91,22 +91,22 @@ public BlockDelta(global::G.InputJsonBlockDelta? value) /// public BlockDelta( global::G.BlockDeltaDiscriminatorType? type, - global::G.TextBlockDelta? text, - global::G.InputJsonBlockDelta? inputJson + global::G.TextBlockDelta? textDelta, + global::G.InputJsonBlockDelta? inputJsonDelta ) { Type = type; - Text = text; - InputJson = inputJson; + TextDelta = textDelta; + InputJsonDelta = inputJsonDelta; } /// /// /// public object? Object => - InputJson as object ?? - Text as object + InputJsonDelta as object ?? + TextDelta as object ; /// @@ -114,15 +114,15 @@ Text as object /// public bool Validate() { - return IsText && !IsInputJson || !IsText && IsInputJson; + return IsTextDelta && !IsInputJsonDelta || !IsTextDelta && IsInputJsonDelta; } /// /// /// public TResult? Match( - global::System.Func? text = null, - global::System.Func? inputJson = null, + global::System.Func? textDelta = null, + global::System.Func? inputJsonDelta = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsTextDelta && textDelta != null) { - return text(Text!); + return textDelta(TextDelta!); } - else if (IsInputJson && inputJson != null) + else if (IsInputJsonDelta && inputJsonDelta != null) { - return inputJson(InputJson!); + return inputJsonDelta(InputJsonDelta!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? text = null, - global::System.Action? inputJson = null, + global::System.Action? textDelta = null, + global::System.Action? inputJsonDelta = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsText) + if (IsTextDelta) { - text?.Invoke(Text!); + textDelta?.Invoke(TextDelta!); } - else if (IsInputJson) + else if (IsInputJsonDelta) { - inputJson?.Invoke(InputJson!); + inputJsonDelta?.Invoke(InputJsonDelta!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + TextDelta, typeof(global::G.TextBlockDelta), - InputJson, + InputJsonDelta, typeof(global::G.InputJsonBlockDelta), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(BlockDelta other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJson, other.InputJson) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextDelta, other.TextDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJsonDelta, other.InputJsonDelta) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.MessageStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.MessageStreamEvent.g.verified.cs index 55f072acb8..abe2eb6aae 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.MessageStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/NewtonsoftJson/_#G.Models.MessageStreamEvent.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A start event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageStartEvent? Start { get; init; } + public global::G.MessageStartEvent? MessageStart { get; init; } #else - public global::G.MessageStartEvent? Start { get; } + public global::G.MessageStartEvent? MessageStart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Start))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStart))] #endif - public bool IsStart => Start != null; + public bool IsMessageStart => MessageStart != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageStartEvent?(MessageStreamEvent @this) => @this.Start; + public static implicit operator global::G.MessageStartEvent?(MessageStreamEvent @this) => @this.MessageStart; /// /// /// public MessageStreamEvent(global::G.MessageStartEvent? value) { - Start = value; + MessageStart = value; } /// /// A delta event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaEvent? Delta { get; init; } + public global::G.MessageDeltaEvent? MessageDelta { get; init; } #else - public global::G.MessageDeltaEvent? Delta { get; } + public global::G.MessageDeltaEvent? MessageDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Delta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDelta))] #endif - public bool IsDelta => Delta != null; + public bool IsMessageDelta => MessageDelta != null; /// /// @@ -76,32 +76,32 @@ public MessageStreamEvent(global::G.MessageStartEvent? value) /// /// /// - public static implicit operator global::G.MessageDeltaEvent?(MessageStreamEvent @this) => @this.Delta; + public static implicit operator global::G.MessageDeltaEvent?(MessageStreamEvent @this) => @this.MessageDelta; /// /// /// public MessageStreamEvent(global::G.MessageDeltaEvent? value) { - Delta = value; + MessageDelta = value; } /// /// A stop event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageStopEvent? Stop { get; init; } + public global::G.MessageStopEvent? MessageStop { get; init; } #else - public global::G.MessageStopEvent? Stop { get; } + public global::G.MessageStopEvent? MessageStop { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Stop))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStop))] #endif - public bool IsStop => Stop != null; + public bool IsMessageStop => MessageStop != null; /// /// @@ -111,14 +111,14 @@ public MessageStreamEvent(global::G.MessageDeltaEvent? value) /// /// /// - public static implicit operator global::G.MessageStopEvent?(MessageStreamEvent @this) => @this.Stop; + public static implicit operator global::G.MessageStopEvent?(MessageStreamEvent @this) => @this.MessageStop; /// /// /// public MessageStreamEvent(global::G.MessageStopEvent? value) { - Stop = value; + MessageStop = value; } /// @@ -301,9 +301,9 @@ public MessageStreamEvent(global::G.ErrorEvent? value) /// public MessageStreamEvent( global::G.MessageStreamEventDiscriminatorType? type, - global::G.MessageStartEvent? start, - global::G.MessageDeltaEvent? delta, - global::G.MessageStopEvent? stop, + global::G.MessageStartEvent? messageStart, + global::G.MessageDeltaEvent? messageDelta, + global::G.MessageStopEvent? messageStop, global::G.ContentBlockStartEvent? contentBlockStart, global::G.ContentBlockDeltaEvent? contentBlockDelta, global::G.ContentBlockStopEvent? contentBlockStop, @@ -313,9 +313,9 @@ public MessageStreamEvent( { Type = type; - Start = start; - Delta = delta; - Stop = stop; + MessageStart = messageStart; + MessageDelta = messageDelta; + MessageStop = messageStop; ContentBlockStart = contentBlockStart; ContentBlockDelta = contentBlockDelta; ContentBlockStop = contentBlockStop; @@ -332,9 +332,9 @@ Ping as object ?? ContentBlockStop as object ?? ContentBlockDelta as object ?? ContentBlockStart as object ?? - Stop as object ?? - Delta as object ?? - Start as object + MessageStop as object ?? + MessageDelta as object ?? + MessageStart as object ; /// @@ -342,16 +342,16 @@ Start as object /// public bool Validate() { - return IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError; + return IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError; } /// /// /// public TResult? Match( - global::System.Func? start = null, - global::System.Func? delta = null, - global::System.Func? stop = null, + global::System.Func? messageStart = null, + global::System.Func? messageDelta = null, + global::System.Func? messageStop = null, global::System.Func? contentBlockStart = null, global::System.Func? contentBlockDelta = null, global::System.Func? contentBlockStop = null, @@ -364,17 +364,17 @@ public bool Validate() Validate(); } - if (IsStart && start != null) + if (IsMessageStart && messageStart != null) { - return start(Start!); + return messageStart(MessageStart!); } - else if (IsDelta && delta != null) + else if (IsMessageDelta && messageDelta != null) { - return delta(Delta!); + return messageDelta(MessageDelta!); } - else if (IsStop && stop != null) + else if (IsMessageStop && messageStop != null) { - return stop(Stop!); + return messageStop(MessageStop!); } else if (IsContentBlockStart && contentBlockStart != null) { @@ -404,9 +404,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? start = null, - global::System.Action? delta = null, - global::System.Action? stop = null, + global::System.Action? messageStart = null, + global::System.Action? messageDelta = null, + global::System.Action? messageStop = null, global::System.Action? contentBlockStart = null, global::System.Action? contentBlockDelta = null, global::System.Action? contentBlockStop = null, @@ -419,17 +419,17 @@ public void Match( Validate(); } - if (IsStart) + if (IsMessageStart) { - start?.Invoke(Start!); + messageStart?.Invoke(MessageStart!); } - else if (IsDelta) + else if (IsMessageDelta) { - delta?.Invoke(Delta!); + messageDelta?.Invoke(MessageDelta!); } - else if (IsStop) + else if (IsMessageStop) { - stop?.Invoke(Stop!); + messageStop?.Invoke(MessageStop!); } else if (IsContentBlockStart) { @@ -460,11 +460,11 @@ public override int GetHashCode() { var fields = new object?[] { - Start, + MessageStart, typeof(global::G.MessageStartEvent), - Delta, + MessageDelta, typeof(global::G.MessageDeltaEvent), - Stop, + MessageStop, typeof(global::G.MessageStopEvent), ContentBlockStart, typeof(global::G.ContentBlockStartEvent), @@ -491,9 +491,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessageStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Start, other.Start) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Delta, other.Delta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Stop, other.Stop) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStart, other.MessageStart) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDelta, other.MessageDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStop, other.MessageStop) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStart, other.ContentBlockStart) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockDelta, other.ContentBlockDelta) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStop, other.ContentBlockStop) && diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.BlockDelta.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.BlockDelta.g.verified.cs index 94293f98ae..53dbb96839 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.BlockDelta.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.BlockDelta.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A delta in a streaming text block. /// #if NET6_0_OR_GREATER - public global::G.TextBlockDelta? Text { get; init; } + public global::G.TextBlockDelta? TextDelta { get; init; } #else - public global::G.TextBlockDelta? Text { get; } + public global::G.TextBlockDelta? TextDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextDelta))] #endif - public bool IsText => Text != null; + public bool IsTextDelta => TextDelta != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.TextBlockDelta?(BlockDelta @this) => @this.Text; + public static implicit operator global::G.TextBlockDelta?(BlockDelta @this) => @this.TextDelta; /// /// /// public BlockDelta(global::G.TextBlockDelta? value) { - Text = value; + TextDelta = value; } /// /// A delta in a streaming input JSON. /// #if NET6_0_OR_GREATER - public global::G.InputJsonBlockDelta? InputJson { get; init; } + public global::G.InputJsonBlockDelta? InputJsonDelta { get; init; } #else - public global::G.InputJsonBlockDelta? InputJson { get; } + public global::G.InputJsonBlockDelta? InputJsonDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJson))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJsonDelta))] #endif - public bool IsInputJson => InputJson != null; + public bool IsInputJsonDelta => InputJsonDelta != null; /// /// @@ -76,14 +76,14 @@ public BlockDelta(global::G.TextBlockDelta? value) /// /// /// - public static implicit operator global::G.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJson; + public static implicit operator global::G.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJsonDelta; /// /// /// public BlockDelta(global::G.InputJsonBlockDelta? value) { - InputJson = value; + InputJsonDelta = value; } /// @@ -91,22 +91,22 @@ public BlockDelta(global::G.InputJsonBlockDelta? value) /// public BlockDelta( global::G.BlockDeltaDiscriminatorType? type, - global::G.TextBlockDelta? text, - global::G.InputJsonBlockDelta? inputJson + global::G.TextBlockDelta? textDelta, + global::G.InputJsonBlockDelta? inputJsonDelta ) { Type = type; - Text = text; - InputJson = inputJson; + TextDelta = textDelta; + InputJsonDelta = inputJsonDelta; } /// /// /// public object? Object => - InputJson as object ?? - Text as object + InputJsonDelta as object ?? + TextDelta as object ; /// @@ -114,15 +114,15 @@ Text as object /// public bool Validate() { - return IsText && !IsInputJson || !IsText && IsInputJson; + return IsTextDelta && !IsInputJsonDelta || !IsTextDelta && IsInputJsonDelta; } /// /// /// public TResult? Match( - global::System.Func? text = null, - global::System.Func? inputJson = null, + global::System.Func? textDelta = null, + global::System.Func? inputJsonDelta = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsText && text != null) + if (IsTextDelta && textDelta != null) { - return text(Text!); + return textDelta(TextDelta!); } - else if (IsInputJson && inputJson != null) + else if (IsInputJsonDelta && inputJsonDelta != null) { - return inputJson(InputJson!); + return inputJsonDelta(InputJsonDelta!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? text = null, - global::System.Action? inputJson = null, + global::System.Action? textDelta = null, + global::System.Action? inputJsonDelta = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsText) + if (IsTextDelta) { - text?.Invoke(Text!); + textDelta?.Invoke(TextDelta!); } - else if (IsInputJson) + else if (IsInputJsonDelta) { - inputJson?.Invoke(InputJson!); + inputJsonDelta?.Invoke(InputJsonDelta!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Text, + TextDelta, typeof(global::G.TextBlockDelta), - InputJson, + InputJsonDelta, typeof(global::G.InputJsonBlockDelta), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(BlockDelta other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJson, other.InputJson) + global::System.Collections.Generic.EqualityComparer.Default.Equals(TextDelta, other.TextDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJsonDelta, other.InputJsonDelta) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.MessageStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.MessageStreamEvent.g.verified.cs index e44577032d..8a2a9afa0d 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.MessageStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#G.Models.MessageStreamEvent.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A start event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageStartEvent? Start { get; init; } + public global::G.MessageStartEvent? MessageStart { get; init; } #else - public global::G.MessageStartEvent? Start { get; } + public global::G.MessageStartEvent? MessageStart { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Start))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStart))] #endif - public bool IsStart => Start != null; + public bool IsMessageStart => MessageStart != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageStartEvent?(MessageStreamEvent @this) => @this.Start; + public static implicit operator global::G.MessageStartEvent?(MessageStreamEvent @this) => @this.MessageStart; /// /// /// public MessageStreamEvent(global::G.MessageStartEvent? value) { - Start = value; + MessageStart = value; } /// /// A delta event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaEvent? Delta { get; init; } + public global::G.MessageDeltaEvent? MessageDelta { get; init; } #else - public global::G.MessageDeltaEvent? Delta { get; } + public global::G.MessageDeltaEvent? MessageDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Delta))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDelta))] #endif - public bool IsDelta => Delta != null; + public bool IsMessageDelta => MessageDelta != null; /// /// @@ -76,32 +76,32 @@ public MessageStreamEvent(global::G.MessageStartEvent? value) /// /// /// - public static implicit operator global::G.MessageDeltaEvent?(MessageStreamEvent @this) => @this.Delta; + public static implicit operator global::G.MessageDeltaEvent?(MessageStreamEvent @this) => @this.MessageDelta; /// /// /// public MessageStreamEvent(global::G.MessageDeltaEvent? value) { - Delta = value; + MessageDelta = value; } /// /// A stop event in a streaming conversation. /// #if NET6_0_OR_GREATER - public global::G.MessageStopEvent? Stop { get; init; } + public global::G.MessageStopEvent? MessageStop { get; init; } #else - public global::G.MessageStopEvent? Stop { get; } + public global::G.MessageStopEvent? MessageStop { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Stop))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStop))] #endif - public bool IsStop => Stop != null; + public bool IsMessageStop => MessageStop != null; /// /// @@ -111,14 +111,14 @@ public MessageStreamEvent(global::G.MessageDeltaEvent? value) /// /// /// - public static implicit operator global::G.MessageStopEvent?(MessageStreamEvent @this) => @this.Stop; + public static implicit operator global::G.MessageStopEvent?(MessageStreamEvent @this) => @this.MessageStop; /// /// /// public MessageStreamEvent(global::G.MessageStopEvent? value) { - Stop = value; + MessageStop = value; } /// @@ -301,9 +301,9 @@ public MessageStreamEvent(global::G.ErrorEvent? value) /// public MessageStreamEvent( global::G.MessageStreamEventDiscriminatorType? type, - global::G.MessageStartEvent? start, - global::G.MessageDeltaEvent? delta, - global::G.MessageStopEvent? stop, + global::G.MessageStartEvent? messageStart, + global::G.MessageDeltaEvent? messageDelta, + global::G.MessageStopEvent? messageStop, global::G.ContentBlockStartEvent? contentBlockStart, global::G.ContentBlockDeltaEvent? contentBlockDelta, global::G.ContentBlockStopEvent? contentBlockStop, @@ -313,9 +313,9 @@ public MessageStreamEvent( { Type = type; - Start = start; - Delta = delta; - Stop = stop; + MessageStart = messageStart; + MessageDelta = messageDelta; + MessageStop = messageStop; ContentBlockStart = contentBlockStart; ContentBlockDelta = contentBlockDelta; ContentBlockStop = contentBlockStop; @@ -332,9 +332,9 @@ Ping as object ?? ContentBlockStop as object ?? ContentBlockDelta as object ?? ContentBlockStart as object ?? - Stop as object ?? - Delta as object ?? - Start as object + MessageStop as object ?? + MessageDelta as object ?? + MessageStart as object ; /// @@ -342,16 +342,16 @@ Start as object /// public bool Validate() { - return IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError; + return IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError; } /// /// /// public TResult? Match( - global::System.Func? start = null, - global::System.Func? delta = null, - global::System.Func? stop = null, + global::System.Func? messageStart = null, + global::System.Func? messageDelta = null, + global::System.Func? messageStop = null, global::System.Func? contentBlockStart = null, global::System.Func? contentBlockDelta = null, global::System.Func? contentBlockStop = null, @@ -364,17 +364,17 @@ public bool Validate() Validate(); } - if (IsStart && start != null) + if (IsMessageStart && messageStart != null) { - return start(Start!); + return messageStart(MessageStart!); } - else if (IsDelta && delta != null) + else if (IsMessageDelta && messageDelta != null) { - return delta(Delta!); + return messageDelta(MessageDelta!); } - else if (IsStop && stop != null) + else if (IsMessageStop && messageStop != null) { - return stop(Stop!); + return messageStop(MessageStop!); } else if (IsContentBlockStart && contentBlockStart != null) { @@ -404,9 +404,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? start = null, - global::System.Action? delta = null, - global::System.Action? stop = null, + global::System.Action? messageStart = null, + global::System.Action? messageDelta = null, + global::System.Action? messageStop = null, global::System.Action? contentBlockStart = null, global::System.Action? contentBlockDelta = null, global::System.Action? contentBlockStop = null, @@ -419,17 +419,17 @@ public void Match( Validate(); } - if (IsStart) + if (IsMessageStart) { - start?.Invoke(Start!); + messageStart?.Invoke(MessageStart!); } - else if (IsDelta) + else if (IsMessageDelta) { - delta?.Invoke(Delta!); + messageDelta?.Invoke(MessageDelta!); } - else if (IsStop) + else if (IsMessageStop) { - stop?.Invoke(Stop!); + messageStop?.Invoke(MessageStop!); } else if (IsContentBlockStart) { @@ -460,11 +460,11 @@ public override int GetHashCode() { var fields = new object?[] { - Start, + MessageStart, typeof(global::G.MessageStartEvent), - Delta, + MessageDelta, typeof(global::G.MessageDeltaEvent), - Stop, + MessageStop, typeof(global::G.MessageStopEvent), ContentBlockStart, typeof(global::G.ContentBlockStartEvent), @@ -491,9 +491,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessageStreamEvent other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Start, other.Start) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Delta, other.Delta) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Stop, other.Stop) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStart, other.MessageStart) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDelta, other.MessageDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStop, other.MessageStop) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStart, other.ContentBlockStart) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockDelta, other.ContentBlockDelta) && global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStop, other.ContentBlockStop) && diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.BlockDelta.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.BlockDelta.g.verified.cs index 04c84ed7f3..957cb8cd42 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.BlockDelta.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.BlockDelta.g.verified.cs @@ -22,25 +22,25 @@ public class BlockDeltaJsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.BlockDeltaDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.TextBlockDelta? text = default; + global::G.TextBlockDelta? textDelta = default; if (discriminator?.Type == global::G.BlockDeltaDiscriminatorType.TextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TextBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TextBlockDelta)}"); - text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + textDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.InputJsonBlockDelta? inputJson = default; + global::G.InputJsonBlockDelta? inputJsonDelta = default; if (discriminator?.Type == global::G.BlockDeltaDiscriminatorType.InputJsonDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.InputJsonBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.InputJsonBlockDelta)}"); - inputJson = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + inputJsonDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.BlockDelta( discriminator?.Type, - text, - inputJson + textDelta, + inputJsonDelta ); return result; @@ -55,17 +55,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.IsText) + if (value.IsTextDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TextBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.TextBlockDelta).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextDelta, typeInfo); } - else if (value.IsInputJson) + else if (value.IsInputJsonDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.InputJsonBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.InputJsonBlockDelta).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputJson, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputJsonDelta, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.MessageStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.MessageStreamEvent.g.verified.cs index 0bc55bcc79..6c3e2cf5ad 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.MessageStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Anthropic/SystemTextJson/_#JsonConverters.MessageStreamEvent.g.verified.cs @@ -22,26 +22,26 @@ public class MessageStreamEventJsonConverter : global::System.Text.Json.Serializ throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageStreamEventDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageStartEvent? start = default; + global::G.MessageStartEvent? messageStart = default; if (discriminator?.Type == global::G.MessageStreamEventDiscriminatorType.MessageStart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageStartEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageStartEvent)}"); - start = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + messageStart = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageDeltaEvent? delta = default; + global::G.MessageDeltaEvent? messageDelta = default; if (discriminator?.Type == global::G.MessageStreamEventDiscriminatorType.MessageDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaEvent)}"); - delta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + messageDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageStopEvent? stop = default; + global::G.MessageStopEvent? messageStop = default; if (discriminator?.Type == global::G.MessageStreamEventDiscriminatorType.MessageStop) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageStopEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageStopEvent)}"); - stop = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + messageStop = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::G.ContentBlockStartEvent? contentBlockStart = default; if (discriminator?.Type == global::G.MessageStreamEventDiscriminatorType.ContentBlockStart) @@ -81,9 +81,9 @@ public class MessageStreamEventJsonConverter : global::System.Text.Json.Serializ var result = new global::G.MessageStreamEvent( discriminator?.Type, - start, - delta, - stop, + messageStart, + messageDelta, + messageStop, contentBlockStart, contentBlockDelta, contentBlockStop, @@ -103,23 +103,23 @@ 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.IsStart) + if (value.IsMessageStart) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageStartEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageStartEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Start, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageStart, typeInfo); } - else if (value.IsDelta) + else if (value.IsMessageDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Delta, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDelta, typeInfo); } - else if (value.IsStop) + else if (value.IsMessageStop) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageStopEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageStopEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Stop, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageStop, typeInfo); } else if (value.IsContentBlockStart) { diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatV2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatV2.g.verified.cs index e5b4d53c8b..be63eb3b43 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatV2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/NewtonsoftJson/_#G.Models.ResponseFormatV2.g.verified.cs @@ -59,18 +59,18 @@ public ResponseFormatV2(global::G.TextResponseFormatV2? value) /// /// #if NET6_0_OR_GREATER - public global::G.JsonResponseFormatV2? Json { get; init; } + public global::G.JsonResponseFormatV2? JsonObject { get; init; } #else - public global::G.JsonResponseFormatV2? Json { get; } + public global::G.JsonResponseFormatV2? JsonObject { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Json))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonObject))] #endif - public bool IsJson => Json != null; + public bool IsJsonObject => JsonObject != null; /// /// @@ -80,14 +80,14 @@ public ResponseFormatV2(global::G.TextResponseFormatV2? value) /// /// /// - public static implicit operator global::G.JsonResponseFormatV2?(ResponseFormatV2 @this) => @this.Json; + public static implicit operator global::G.JsonResponseFormatV2?(ResponseFormatV2 @this) => @this.JsonObject; /// /// /// public ResponseFormatV2(global::G.JsonResponseFormatV2? value) { - Json = value; + JsonObject = value; } /// @@ -96,20 +96,20 @@ public ResponseFormatV2(global::G.JsonResponseFormatV2? value) public ResponseFormatV2( global::G.ResponseFormatV2DiscriminatorType? type, global::G.TextResponseFormatV2? text, - global::G.JsonResponseFormatV2? json + global::G.JsonResponseFormatV2? jsonObject ) { Type = type; Text = text; - Json = json; + JsonObject = jsonObject; } /// /// /// public object? Object => - Json as object ?? + JsonObject as object ?? Text as object ; @@ -118,7 +118,7 @@ Text as object /// public bool Validate() { - return IsText && !IsJson || !IsText && IsJson; + return IsText && !IsJsonObject || !IsText && IsJsonObject; } /// @@ -126,7 +126,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? json = null, + global::System.Func? jsonObject = null, bool validate = true) { if (validate) @@ -138,9 +138,9 @@ public bool Validate() { return text(Text!); } - else if (IsJson && json != null) + else if (IsJsonObject && jsonObject != null) { - return json(Json!); + return jsonObject(JsonObject!); } return default(TResult); @@ -151,7 +151,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? json = null, + global::System.Action? jsonObject = null, bool validate = true) { if (validate) @@ -163,9 +163,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsJson) + else if (IsJsonObject) { - json?.Invoke(Json!); + jsonObject?.Invoke(JsonObject!); } } @@ -178,7 +178,7 @@ public override int GetHashCode() { Text, typeof(global::G.TextResponseFormatV2), - Json, + JsonObject, typeof(global::G.JsonResponseFormatV2), }; const int offset = unchecked((int)2166136261); @@ -196,7 +196,7 @@ public bool Equals(ResponseFormatV2 other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Json, other.Json) + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatV2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatV2.g.verified.cs index 87fd4300fd..825d9cadf7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatV2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#G.Models.ResponseFormatV2.g.verified.cs @@ -59,18 +59,18 @@ public ResponseFormatV2(global::G.TextResponseFormatV2? value) /// /// #if NET6_0_OR_GREATER - public global::G.JsonResponseFormatV2? Json { get; init; } + public global::G.JsonResponseFormatV2? JsonObject { get; init; } #else - public global::G.JsonResponseFormatV2? Json { get; } + public global::G.JsonResponseFormatV2? JsonObject { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Json))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(JsonObject))] #endif - public bool IsJson => Json != null; + public bool IsJsonObject => JsonObject != null; /// /// @@ -80,14 +80,14 @@ public ResponseFormatV2(global::G.TextResponseFormatV2? value) /// /// /// - public static implicit operator global::G.JsonResponseFormatV2?(ResponseFormatV2 @this) => @this.Json; + public static implicit operator global::G.JsonResponseFormatV2?(ResponseFormatV2 @this) => @this.JsonObject; /// /// /// public ResponseFormatV2(global::G.JsonResponseFormatV2? value) { - Json = value; + JsonObject = value; } /// @@ -96,20 +96,20 @@ public ResponseFormatV2(global::G.JsonResponseFormatV2? value) public ResponseFormatV2( global::G.ResponseFormatV2DiscriminatorType? type, global::G.TextResponseFormatV2? text, - global::G.JsonResponseFormatV2? json + global::G.JsonResponseFormatV2? jsonObject ) { Type = type; Text = text; - Json = json; + JsonObject = jsonObject; } /// /// /// public object? Object => - Json as object ?? + JsonObject as object ?? Text as object ; @@ -118,7 +118,7 @@ Text as object /// public bool Validate() { - return IsText && !IsJson || !IsText && IsJson; + return IsText && !IsJsonObject || !IsText && IsJsonObject; } /// @@ -126,7 +126,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? json = null, + global::System.Func? jsonObject = null, bool validate = true) { if (validate) @@ -138,9 +138,9 @@ public bool Validate() { return text(Text!); } - else if (IsJson && json != null) + else if (IsJsonObject && jsonObject != null) { - return json(Json!); + return jsonObject(JsonObject!); } return default(TResult); @@ -151,7 +151,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? json = null, + global::System.Action? jsonObject = null, bool validate = true) { if (validate) @@ -163,9 +163,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsJson) + else if (IsJsonObject) { - json?.Invoke(Json!); + jsonObject?.Invoke(JsonObject!); } } @@ -178,7 +178,7 @@ public override int GetHashCode() { Text, typeof(global::G.TextResponseFormatV2), - Json, + JsonObject, typeof(global::G.JsonResponseFormatV2), }; const int offset = unchecked((int)2166136261); @@ -196,7 +196,7 @@ public bool Equals(ResponseFormatV2 other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Json, other.Json) + global::System.Collections.Generic.EqualityComparer.Default.Equals(JsonObject, other.JsonObject) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatV2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatV2.g.verified.cs index 7177133865..6183bd20a7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatV2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/Cohere/SystemTextJson/_#JsonConverters.ResponseFormatV2.g.verified.cs @@ -29,18 +29,18 @@ public class ResponseFormatV2JsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TextResponseFormatV2)}"); text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.JsonResponseFormatV2? json = default; + global::G.JsonResponseFormatV2? jsonObject = default; if (discriminator?.Type == global::G.ResponseFormatV2DiscriminatorType.JsonObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.JsonResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.JsonResponseFormatV2)}"); - json = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + jsonObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ResponseFormatV2( discriminator?.Type, text, - json + jsonObject ); return result; @@ -61,11 +61,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.TextResponseFormatV2).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsJson) + else if (value.IsJsonObject) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.JsonResponseFormatV2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.JsonResponseFormatV2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Json, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.JsonObject, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/NewtonsoftJson/_#G.Models.RepositoryRule.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/NewtonsoftJson/_#G.Models.RepositoryRule.g.verified.cs index 47e92a3c26..39db0f332d 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/NewtonsoftJson/_#G.Models.RepositoryRule.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/NewtonsoftJson/_#G.Models.RepositoryRule.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Only allow users with bypass permission to create matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCreation? Value1 { get; init; } + public global::G.RepositoryRuleCreation? Creation { get; init; } #else - public global::G.RepositoryRuleCreation? Value1 { get; } + public global::G.RepositoryRuleCreation? Creation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Creation))] #endif - public bool IsValue1 => Value1 != null; + public bool IsCreation => Creation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RepositoryRuleCreation?(RepositoryRule @this) => @this.Value1; + public static implicit operator global::G.RepositoryRuleCreation?(RepositoryRule @this) => @this.Creation; /// /// /// public RepositoryRule(global::G.RepositoryRuleCreation? value) { - Value1 = value; + Creation = value; } /// /// Only allow users with bypass permission to update matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleUpdate? Value2 { get; init; } + public global::G.RepositoryRuleUpdate? Update { get; init; } #else - public global::G.RepositoryRuleUpdate? Value2 { get; } + public global::G.RepositoryRuleUpdate? Update { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Update))] #endif - public bool IsValue2 => Value2 != null; + public bool IsUpdate => Update != null; /// /// @@ -76,32 +76,32 @@ public RepositoryRule(global::G.RepositoryRuleCreation? value) /// /// /// - public static implicit operator global::G.RepositoryRuleUpdate?(RepositoryRule @this) => @this.Value2; + public static implicit operator global::G.RepositoryRuleUpdate?(RepositoryRule @this) => @this.Update; /// /// /// public RepositoryRule(global::G.RepositoryRuleUpdate? value) { - Value2 = value; + Update = value; } /// /// Only allow users with bypass permissions to delete matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleDeletion? Value3 { get; init; } + public global::G.RepositoryRuleDeletion? Deletion { get; init; } #else - public global::G.RepositoryRuleDeletion? Value3 { get; } + public global::G.RepositoryRuleDeletion? Deletion { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Deletion))] #endif - public bool IsValue3 => Value3 != null; + public bool IsDeletion => Deletion != null; /// /// @@ -111,32 +111,32 @@ public RepositoryRule(global::G.RepositoryRuleUpdate? value) /// /// /// - public static implicit operator global::G.RepositoryRuleDeletion?(RepositoryRule @this) => @this.Value3; + public static implicit operator global::G.RepositoryRuleDeletion?(RepositoryRule @this) => @this.Deletion; /// /// /// public RepositoryRule(global::G.RepositoryRuleDeletion? value) { - Value3 = value; + Deletion = value; } /// /// Prevent merge commits from being pushed to matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredLinearHistory? Value4 { get; init; } + public global::G.RepositoryRuleRequiredLinearHistory? RequiredLinearHistory { get; init; } #else - public global::G.RepositoryRuleRequiredLinearHistory? Value4 { get; } + public global::G.RepositoryRuleRequiredLinearHistory? RequiredLinearHistory { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredLinearHistory))] #endif - public bool IsValue4 => Value4 != null; + public bool IsRequiredLinearHistory => RequiredLinearHistory != null; /// /// @@ -146,32 +146,32 @@ public RepositoryRule(global::G.RepositoryRuleDeletion? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredLinearHistory?(RepositoryRule @this) => @this.Value4; + public static implicit operator global::G.RepositoryRuleRequiredLinearHistory?(RepositoryRule @this) => @this.RequiredLinearHistory; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredLinearHistory? value) { - Value4 = value; + RequiredLinearHistory = value; } /// /// Merges must be performed via a merge queue. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleMergeQueue? Value5 { get; init; } + public global::G.RepositoryRuleMergeQueue? MergeQueue { get; init; } #else - public global::G.RepositoryRuleMergeQueue? Value5 { get; } + public global::G.RepositoryRuleMergeQueue? MergeQueue { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MergeQueue))] #endif - public bool IsValue5 => Value5 != null; + public bool IsMergeQueue => MergeQueue != null; /// /// @@ -181,32 +181,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredLinearHistory? value) /// /// /// - public static implicit operator global::G.RepositoryRuleMergeQueue?(RepositoryRule @this) => @this.Value5; + public static implicit operator global::G.RepositoryRuleMergeQueue?(RepositoryRule @this) => @this.MergeQueue; /// /// /// public RepositoryRule(global::G.RepositoryRuleMergeQueue? value) { - Value5 = value; + MergeQueue = value; } /// /// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredDeployments? Value6 { get; init; } + public global::G.RepositoryRuleRequiredDeployments? RequiredDeployments { get; init; } #else - public global::G.RepositoryRuleRequiredDeployments? Value6 { get; } + public global::G.RepositoryRuleRequiredDeployments? RequiredDeployments { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredDeployments))] #endif - public bool IsValue6 => Value6 != null; + public bool IsRequiredDeployments => RequiredDeployments != null; /// /// @@ -216,32 +216,32 @@ public RepositoryRule(global::G.RepositoryRuleMergeQueue? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredDeployments?(RepositoryRule @this) => @this.Value6; + public static implicit operator global::G.RepositoryRuleRequiredDeployments?(RepositoryRule @this) => @this.RequiredDeployments; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredDeployments? value) { - Value6 = value; + RequiredDeployments = value; } /// /// Commits pushed to matching refs must have verified signatures. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredSignatures? Value7 { get; init; } + public global::G.RepositoryRuleRequiredSignatures? RequiredSignatures { get; init; } #else - public global::G.RepositoryRuleRequiredSignatures? Value7 { get; } + public global::G.RepositoryRuleRequiredSignatures? RequiredSignatures { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredSignatures))] #endif - public bool IsValue7 => Value7 != null; + public bool IsRequiredSignatures => RequiredSignatures != null; /// /// @@ -251,32 +251,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredDeployments? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredSignatures?(RepositoryRule @this) => @this.Value7; + public static implicit operator global::G.RepositoryRuleRequiredSignatures?(RepositoryRule @this) => @this.RequiredSignatures; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredSignatures? value) { - Value7 = value; + RequiredSignatures = value; } /// /// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRulePullRequest? Value8 { get; init; } + public global::G.RepositoryRulePullRequest? PullRequest { get; init; } #else - public global::G.RepositoryRulePullRequest? Value8 { get; } + public global::G.RepositoryRulePullRequest? PullRequest { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PullRequest))] #endif - public bool IsValue8 => Value8 != null; + public bool IsPullRequest => PullRequest != null; /// /// @@ -286,32 +286,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredSignatures? value) /// /// /// - public static implicit operator global::G.RepositoryRulePullRequest?(RepositoryRule @this) => @this.Value8; + public static implicit operator global::G.RepositoryRulePullRequest?(RepositoryRule @this) => @this.PullRequest; /// /// /// public RepositoryRule(global::G.RepositoryRulePullRequest? value) { - Value8 = value; + PullRequest = value; } /// /// Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredStatusChecks? Value9 { get; init; } + public global::G.RepositoryRuleRequiredStatusChecks? RequiredStatusChecks { get; init; } #else - public global::G.RepositoryRuleRequiredStatusChecks? Value9 { get; } + public global::G.RepositoryRuleRequiredStatusChecks? RequiredStatusChecks { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredStatusChecks))] #endif - public bool IsValue9 => Value9 != null; + public bool IsRequiredStatusChecks => RequiredStatusChecks != null; /// /// @@ -321,32 +321,32 @@ public RepositoryRule(global::G.RepositoryRulePullRequest? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredStatusChecks?(RepositoryRule @this) => @this.Value9; + public static implicit operator global::G.RepositoryRuleRequiredStatusChecks?(RepositoryRule @this) => @this.RequiredStatusChecks; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredStatusChecks? value) { - Value9 = value; + RequiredStatusChecks = value; } /// /// Prevent users with push access from force pushing to refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleNonFastForward? Value10 { get; init; } + public global::G.RepositoryRuleNonFastForward? NonFastForward { get; init; } #else - public global::G.RepositoryRuleNonFastForward? Value10 { get; } + public global::G.RepositoryRuleNonFastForward? NonFastForward { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(NonFastForward))] #endif - public bool IsValue10 => Value10 != null; + public bool IsNonFastForward => NonFastForward != null; /// /// @@ -356,32 +356,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredStatusChecks? value) /// /// /// - public static implicit operator global::G.RepositoryRuleNonFastForward?(RepositoryRule @this) => @this.Value10; + public static implicit operator global::G.RepositoryRuleNonFastForward?(RepositoryRule @this) => @this.NonFastForward; /// /// /// public RepositoryRule(global::G.RepositoryRuleNonFastForward? value) { - Value10 = value; + NonFastForward = value; } /// /// Parameters to be used for the commit_message_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitMessagePattern? Value11 { get; init; } + public global::G.RepositoryRuleCommitMessagePattern? CommitMessagePattern { get; init; } #else - public global::G.RepositoryRuleCommitMessagePattern? Value11 { get; } + public global::G.RepositoryRuleCommitMessagePattern? CommitMessagePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value11))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitMessagePattern))] #endif - public bool IsValue11 => Value11 != null; + public bool IsCommitMessagePattern => CommitMessagePattern != null; /// /// @@ -391,32 +391,32 @@ public RepositoryRule(global::G.RepositoryRuleNonFastForward? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitMessagePattern?(RepositoryRule @this) => @this.Value11; + public static implicit operator global::G.RepositoryRuleCommitMessagePattern?(RepositoryRule @this) => @this.CommitMessagePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitMessagePattern? value) { - Value11 = value; + CommitMessagePattern = value; } /// /// Parameters to be used for the commit_author_email_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitAuthorEmailPattern? Value12 { get; init; } + public global::G.RepositoryRuleCommitAuthorEmailPattern? CommitAuthorEmailPattern { get; init; } #else - public global::G.RepositoryRuleCommitAuthorEmailPattern? Value12 { get; } + public global::G.RepositoryRuleCommitAuthorEmailPattern? CommitAuthorEmailPattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value12))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitAuthorEmailPattern))] #endif - public bool IsValue12 => Value12 != null; + public bool IsCommitAuthorEmailPattern => CommitAuthorEmailPattern != null; /// /// @@ -426,32 +426,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitMessagePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitAuthorEmailPattern?(RepositoryRule @this) => @this.Value12; + public static implicit operator global::G.RepositoryRuleCommitAuthorEmailPattern?(RepositoryRule @this) => @this.CommitAuthorEmailPattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitAuthorEmailPattern? value) { - Value12 = value; + CommitAuthorEmailPattern = value; } /// /// Parameters to be used for the committer_email_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitterEmailPattern? Value13 { get; init; } + public global::G.RepositoryRuleCommitterEmailPattern? CommitterEmailPattern { get; init; } #else - public global::G.RepositoryRuleCommitterEmailPattern? Value13 { get; } + public global::G.RepositoryRuleCommitterEmailPattern? CommitterEmailPattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value13))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitterEmailPattern))] #endif - public bool IsValue13 => Value13 != null; + public bool IsCommitterEmailPattern => CommitterEmailPattern != null; /// /// @@ -461,32 +461,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitAuthorEmailPattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitterEmailPattern?(RepositoryRule @this) => @this.Value13; + public static implicit operator global::G.RepositoryRuleCommitterEmailPattern?(RepositoryRule @this) => @this.CommitterEmailPattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitterEmailPattern? value) { - Value13 = value; + CommitterEmailPattern = value; } /// /// Parameters to be used for the branch_name_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleBranchNamePattern? Value14 { get; init; } + public global::G.RepositoryRuleBranchNamePattern? BranchNamePattern { get; init; } #else - public global::G.RepositoryRuleBranchNamePattern? Value14 { get; } + public global::G.RepositoryRuleBranchNamePattern? BranchNamePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value14))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BranchNamePattern))] #endif - public bool IsValue14 => Value14 != null; + public bool IsBranchNamePattern => BranchNamePattern != null; /// /// @@ -496,32 +496,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitterEmailPattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleBranchNamePattern?(RepositoryRule @this) => @this.Value14; + public static implicit operator global::G.RepositoryRuleBranchNamePattern?(RepositoryRule @this) => @this.BranchNamePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleBranchNamePattern? value) { - Value14 = value; + BranchNamePattern = value; } /// /// Parameters to be used for the tag_name_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleTagNamePattern? Value15 { get; init; } + public global::G.RepositoryRuleTagNamePattern? TagNamePattern { get; init; } #else - public global::G.RepositoryRuleTagNamePattern? Value15 { get; } + public global::G.RepositoryRuleTagNamePattern? TagNamePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value15))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TagNamePattern))] #endif - public bool IsValue15 => Value15 != null; + public bool IsTagNamePattern => TagNamePattern != null; /// /// @@ -531,32 +531,32 @@ public RepositoryRule(global::G.RepositoryRuleBranchNamePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleTagNamePattern?(RepositoryRule @this) => @this.Value15; + public static implicit operator global::G.RepositoryRuleTagNamePattern?(RepositoryRule @this) => @this.TagNamePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleTagNamePattern? value) { - Value15 = value; + TagNamePattern = value; } /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant16? Value16 { get; init; } + public global::G.RepositoryRuleVariant16? FilePathRestriction { get; init; } #else - public global::G.RepositoryRuleVariant16? Value16 { get; } + public global::G.RepositoryRuleVariant16? FilePathRestriction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value16))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePathRestriction))] #endif - public bool IsValue16 => Value16 != null; + public bool IsFilePathRestriction => FilePathRestriction != null; /// /// @@ -566,32 +566,32 @@ public RepositoryRule(global::G.RepositoryRuleTagNamePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant16?(RepositoryRule @this) => @this.Value16; + public static implicit operator global::G.RepositoryRuleVariant16?(RepositoryRule @this) => @this.FilePathRestriction; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant16? value) { - Value16 = value; + FilePathRestriction = value; } /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant17? Value17 { get; init; } + public global::G.RepositoryRuleVariant17? MaxFilePathLength { get; init; } #else - public global::G.RepositoryRuleVariant17? Value17 { get; } + public global::G.RepositoryRuleVariant17? MaxFilePathLength { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value17))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaxFilePathLength))] #endif - public bool IsValue17 => Value17 != null; + public bool IsMaxFilePathLength => MaxFilePathLength != null; /// /// @@ -601,32 +601,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant16? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant17?(RepositoryRule @this) => @this.Value17; + public static implicit operator global::G.RepositoryRuleVariant17?(RepositoryRule @this) => @this.MaxFilePathLength; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant17? value) { - Value17 = value; + MaxFilePathLength = value; } /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant18? Value18 { get; init; } + public global::G.RepositoryRuleVariant18? FileExtensionRestriction { get; init; } #else - public global::G.RepositoryRuleVariant18? Value18 { get; } + public global::G.RepositoryRuleVariant18? FileExtensionRestriction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value18))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileExtensionRestriction))] #endif - public bool IsValue18 => Value18 != null; + public bool IsFileExtensionRestriction => FileExtensionRestriction != null; /// /// @@ -636,32 +636,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant17? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant18?(RepositoryRule @this) => @this.Value18; + public static implicit operator global::G.RepositoryRuleVariant18?(RepositoryRule @this) => @this.FileExtensionRestriction; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant18? value) { - Value18 = value; + FileExtensionRestriction = value; } /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant19? Value19 { get; init; } + public global::G.RepositoryRuleVariant19? MaxFileSize { get; init; } #else - public global::G.RepositoryRuleVariant19? Value19 { get; } + public global::G.RepositoryRuleVariant19? MaxFileSize { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value19))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaxFileSize))] #endif - public bool IsValue19 => Value19 != null; + public bool IsMaxFileSize => MaxFileSize != null; /// /// @@ -671,32 +671,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant18? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant19?(RepositoryRule @this) => @this.Value19; + public static implicit operator global::G.RepositoryRuleVariant19?(RepositoryRule @this) => @this.MaxFileSize; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant19? value) { - Value19 = value; + MaxFileSize = value; } /// /// Require all changes made to a targeted branch to pass the specified workflows before they can be merged. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleWorkflows? Value20 { get; init; } + public global::G.RepositoryRuleWorkflows? Workflows { get; init; } #else - public global::G.RepositoryRuleWorkflows? Value20 { get; } + public global::G.RepositoryRuleWorkflows? Workflows { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value20))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Workflows))] #endif - public bool IsValue20 => Value20 != null; + public bool IsWorkflows => Workflows != null; /// /// @@ -706,32 +706,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant19? value) /// /// /// - public static implicit operator global::G.RepositoryRuleWorkflows?(RepositoryRule @this) => @this.Value20; + public static implicit operator global::G.RepositoryRuleWorkflows?(RepositoryRule @this) => @this.Workflows; /// /// /// public RepositoryRule(global::G.RepositoryRuleWorkflows? value) { - Value20 = value; + Workflows = value; } /// /// Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCodeScanning? Value21 { get; init; } + public global::G.RepositoryRuleCodeScanning? CodeScanning { get; init; } #else - public global::G.RepositoryRuleCodeScanning? Value21 { get; } + public global::G.RepositoryRuleCodeScanning? CodeScanning { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeScanning))] #endif - public bool IsValue21 => Value21 != null; + public bool IsCodeScanning => CodeScanning != null; /// /// @@ -741,14 +741,14 @@ public RepositoryRule(global::G.RepositoryRuleWorkflows? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCodeScanning?(RepositoryRule @this) => @this.Value21; + public static implicit operator global::G.RepositoryRuleCodeScanning?(RepositoryRule @this) => @this.CodeScanning; /// /// /// public RepositoryRule(global::G.RepositoryRuleCodeScanning? value) { - Value21 = value; + CodeScanning = value; } /// @@ -756,79 +756,79 @@ public RepositoryRule(global::G.RepositoryRuleCodeScanning? value) /// public RepositoryRule( global::G.RepositoryRuleDiscriminatorType? type, - global::G.RepositoryRuleCreation? value1, - global::G.RepositoryRuleUpdate? value2, - global::G.RepositoryRuleDeletion? value3, - global::G.RepositoryRuleRequiredLinearHistory? value4, - global::G.RepositoryRuleMergeQueue? value5, - global::G.RepositoryRuleRequiredDeployments? value6, - global::G.RepositoryRuleRequiredSignatures? value7, - global::G.RepositoryRulePullRequest? value8, - global::G.RepositoryRuleRequiredStatusChecks? value9, - global::G.RepositoryRuleNonFastForward? value10, - global::G.RepositoryRuleCommitMessagePattern? value11, - global::G.RepositoryRuleCommitAuthorEmailPattern? value12, - global::G.RepositoryRuleCommitterEmailPattern? value13, - global::G.RepositoryRuleBranchNamePattern? value14, - global::G.RepositoryRuleTagNamePattern? value15, - global::G.RepositoryRuleVariant16? value16, - global::G.RepositoryRuleVariant17? value17, - global::G.RepositoryRuleVariant18? value18, - global::G.RepositoryRuleVariant19? value19, - global::G.RepositoryRuleWorkflows? value20, - global::G.RepositoryRuleCodeScanning? value21 + global::G.RepositoryRuleCreation? creation, + global::G.RepositoryRuleUpdate? update, + global::G.RepositoryRuleDeletion? deletion, + global::G.RepositoryRuleRequiredLinearHistory? requiredLinearHistory, + global::G.RepositoryRuleMergeQueue? mergeQueue, + global::G.RepositoryRuleRequiredDeployments? requiredDeployments, + global::G.RepositoryRuleRequiredSignatures? requiredSignatures, + global::G.RepositoryRulePullRequest? pullRequest, + global::G.RepositoryRuleRequiredStatusChecks? requiredStatusChecks, + global::G.RepositoryRuleNonFastForward? nonFastForward, + global::G.RepositoryRuleCommitMessagePattern? commitMessagePattern, + global::G.RepositoryRuleCommitAuthorEmailPattern? commitAuthorEmailPattern, + global::G.RepositoryRuleCommitterEmailPattern? committerEmailPattern, + global::G.RepositoryRuleBranchNamePattern? branchNamePattern, + global::G.RepositoryRuleTagNamePattern? tagNamePattern, + global::G.RepositoryRuleVariant16? filePathRestriction, + global::G.RepositoryRuleVariant17? maxFilePathLength, + global::G.RepositoryRuleVariant18? fileExtensionRestriction, + global::G.RepositoryRuleVariant19? maxFileSize, + global::G.RepositoryRuleWorkflows? workflows, + global::G.RepositoryRuleCodeScanning? codeScanning ) { Type = type; - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - Value8 = value8; - Value9 = value9; - Value10 = value10; - Value11 = value11; - Value12 = value12; - Value13 = value13; - Value14 = value14; - Value15 = value15; - Value16 = value16; - Value17 = value17; - Value18 = value18; - Value19 = value19; - Value20 = value20; - Value21 = value21; + Creation = creation; + Update = update; + Deletion = deletion; + RequiredLinearHistory = requiredLinearHistory; + MergeQueue = mergeQueue; + RequiredDeployments = requiredDeployments; + RequiredSignatures = requiredSignatures; + PullRequest = pullRequest; + RequiredStatusChecks = requiredStatusChecks; + NonFastForward = nonFastForward; + CommitMessagePattern = commitMessagePattern; + CommitAuthorEmailPattern = commitAuthorEmailPattern; + CommitterEmailPattern = committerEmailPattern; + BranchNamePattern = branchNamePattern; + TagNamePattern = tagNamePattern; + FilePathRestriction = filePathRestriction; + MaxFilePathLength = maxFilePathLength; + FileExtensionRestriction = fileExtensionRestriction; + MaxFileSize = maxFileSize; + Workflows = workflows; + CodeScanning = codeScanning; } /// /// /// public object? Object => - Value21 as object ?? - Value20 as object ?? - Value19 as object ?? - Value18 as object ?? - Value17 as object ?? - Value16 as object ?? - Value15 as object ?? - Value14 as object ?? - Value13 as object ?? - Value12 as object ?? - Value11 as object ?? - Value10 as object ?? - Value9 as object ?? - Value8 as object ?? - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object + CodeScanning as object ?? + Workflows as object ?? + MaxFileSize as object ?? + FileExtensionRestriction as object ?? + MaxFilePathLength as object ?? + FilePathRestriction as object ?? + TagNamePattern as object ?? + BranchNamePattern as object ?? + CommitterEmailPattern as object ?? + CommitAuthorEmailPattern as object ?? + CommitMessagePattern as object ?? + NonFastForward as object ?? + RequiredStatusChecks as object ?? + PullRequest as object ?? + RequiredSignatures as object ?? + RequiredDeployments as object ?? + MergeQueue as object ?? + RequiredLinearHistory as object ?? + Deletion as object ?? + Update as object ?? + Creation as object ; /// @@ -836,34 +836,34 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && IsValue21; + return IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && IsCodeScanning; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - global::System.Func? value8 = null, - global::System.Func? value9 = null, - global::System.Func? value10 = null, - global::System.Func? value11 = null, - global::System.Func? value12 = null, - global::System.Func? value13 = null, - global::System.Func? value14 = null, - global::System.Func? value15 = null, - global::System.Func? value16 = null, - global::System.Func? value17 = null, - global::System.Func? value18 = null, - global::System.Func? value19 = null, - global::System.Func? value20 = null, - global::System.Func? value21 = null, + global::System.Func? creation = null, + global::System.Func? update = null, + global::System.Func? deletion = null, + global::System.Func? requiredLinearHistory = null, + global::System.Func? mergeQueue = null, + global::System.Func? requiredDeployments = null, + global::System.Func? requiredSignatures = null, + global::System.Func? pullRequest = null, + global::System.Func? requiredStatusChecks = null, + global::System.Func? nonFastForward = null, + global::System.Func? commitMessagePattern = null, + global::System.Func? commitAuthorEmailPattern = null, + global::System.Func? committerEmailPattern = null, + global::System.Func? branchNamePattern = null, + global::System.Func? tagNamePattern = null, + global::System.Func? filePathRestriction = null, + global::System.Func? maxFilePathLength = null, + global::System.Func? fileExtensionRestriction = null, + global::System.Func? maxFileSize = null, + global::System.Func? workflows = null, + global::System.Func? codeScanning = null, bool validate = true) { if (validate) @@ -871,89 +871,89 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsCreation && creation != null) { - return value1(Value1!); + return creation(Creation!); } - else if (IsValue2 && value2 != null) + else if (IsUpdate && update != null) { - return value2(Value2!); + return update(Update!); } - else if (IsValue3 && value3 != null) + else if (IsDeletion && deletion != null) { - return value3(Value3!); + return deletion(Deletion!); } - else if (IsValue4 && value4 != null) + else if (IsRequiredLinearHistory && requiredLinearHistory != null) { - return value4(Value4!); + return requiredLinearHistory(RequiredLinearHistory!); } - else if (IsValue5 && value5 != null) + else if (IsMergeQueue && mergeQueue != null) { - return value5(Value5!); + return mergeQueue(MergeQueue!); } - else if (IsValue6 && value6 != null) + else if (IsRequiredDeployments && requiredDeployments != null) { - return value6(Value6!); + return requiredDeployments(RequiredDeployments!); } - else if (IsValue7 && value7 != null) + else if (IsRequiredSignatures && requiredSignatures != null) { - return value7(Value7!); + return requiredSignatures(RequiredSignatures!); } - else if (IsValue8 && value8 != null) + else if (IsPullRequest && pullRequest != null) { - return value8(Value8!); + return pullRequest(PullRequest!); } - else if (IsValue9 && value9 != null) + else if (IsRequiredStatusChecks && requiredStatusChecks != null) { - return value9(Value9!); + return requiredStatusChecks(RequiredStatusChecks!); } - else if (IsValue10 && value10 != null) + else if (IsNonFastForward && nonFastForward != null) { - return value10(Value10!); + return nonFastForward(NonFastForward!); } - else if (IsValue11 && value11 != null) + else if (IsCommitMessagePattern && commitMessagePattern != null) { - return value11(Value11!); + return commitMessagePattern(CommitMessagePattern!); } - else if (IsValue12 && value12 != null) + else if (IsCommitAuthorEmailPattern && commitAuthorEmailPattern != null) { - return value12(Value12!); + return commitAuthorEmailPattern(CommitAuthorEmailPattern!); } - else if (IsValue13 && value13 != null) + else if (IsCommitterEmailPattern && committerEmailPattern != null) { - return value13(Value13!); + return committerEmailPattern(CommitterEmailPattern!); } - else if (IsValue14 && value14 != null) + else if (IsBranchNamePattern && branchNamePattern != null) { - return value14(Value14!); + return branchNamePattern(BranchNamePattern!); } - else if (IsValue15 && value15 != null) + else if (IsTagNamePattern && tagNamePattern != null) { - return value15(Value15!); + return tagNamePattern(TagNamePattern!); } - else if (IsValue16 && value16 != null) + else if (IsFilePathRestriction && filePathRestriction != null) { - return value16(Value16!); + return filePathRestriction(FilePathRestriction!); } - else if (IsValue17 && value17 != null) + else if (IsMaxFilePathLength && maxFilePathLength != null) { - return value17(Value17!); + return maxFilePathLength(MaxFilePathLength!); } - else if (IsValue18 && value18 != null) + else if (IsFileExtensionRestriction && fileExtensionRestriction != null) { - return value18(Value18!); + return fileExtensionRestriction(FileExtensionRestriction!); } - else if (IsValue19 && value19 != null) + else if (IsMaxFileSize && maxFileSize != null) { - return value19(Value19!); + return maxFileSize(MaxFileSize!); } - else if (IsValue20 && value20 != null) + else if (IsWorkflows && workflows != null) { - return value20(Value20!); + return workflows(Workflows!); } - else if (IsValue21 && value21 != null) + else if (IsCodeScanning && codeScanning != null) { - return value21(Value21!); + return codeScanning(CodeScanning!); } return default(TResult); @@ -963,27 +963,27 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - global::System.Action? value8 = null, - global::System.Action? value9 = null, - global::System.Action? value10 = null, - global::System.Action? value11 = null, - global::System.Action? value12 = null, - global::System.Action? value13 = null, - global::System.Action? value14 = null, - global::System.Action? value15 = null, - global::System.Action? value16 = null, - global::System.Action? value17 = null, - global::System.Action? value18 = null, - global::System.Action? value19 = null, - global::System.Action? value20 = null, - global::System.Action? value21 = null, + global::System.Action? creation = null, + global::System.Action? update = null, + global::System.Action? deletion = null, + global::System.Action? requiredLinearHistory = null, + global::System.Action? mergeQueue = null, + global::System.Action? requiredDeployments = null, + global::System.Action? requiredSignatures = null, + global::System.Action? pullRequest = null, + global::System.Action? requiredStatusChecks = null, + global::System.Action? nonFastForward = null, + global::System.Action? commitMessagePattern = null, + global::System.Action? commitAuthorEmailPattern = null, + global::System.Action? committerEmailPattern = null, + global::System.Action? branchNamePattern = null, + global::System.Action? tagNamePattern = null, + global::System.Action? filePathRestriction = null, + global::System.Action? maxFilePathLength = null, + global::System.Action? fileExtensionRestriction = null, + global::System.Action? maxFileSize = null, + global::System.Action? workflows = null, + global::System.Action? codeScanning = null, bool validate = true) { if (validate) @@ -991,89 +991,89 @@ public void Match( Validate(); } - if (IsValue1) + if (IsCreation) { - value1?.Invoke(Value1!); + creation?.Invoke(Creation!); } - else if (IsValue2) + else if (IsUpdate) { - value2?.Invoke(Value2!); + update?.Invoke(Update!); } - else if (IsValue3) + else if (IsDeletion) { - value3?.Invoke(Value3!); + deletion?.Invoke(Deletion!); } - else if (IsValue4) + else if (IsRequiredLinearHistory) { - value4?.Invoke(Value4!); + requiredLinearHistory?.Invoke(RequiredLinearHistory!); } - else if (IsValue5) + else if (IsMergeQueue) { - value5?.Invoke(Value5!); + mergeQueue?.Invoke(MergeQueue!); } - else if (IsValue6) + else if (IsRequiredDeployments) { - value6?.Invoke(Value6!); + requiredDeployments?.Invoke(RequiredDeployments!); } - else if (IsValue7) + else if (IsRequiredSignatures) { - value7?.Invoke(Value7!); + requiredSignatures?.Invoke(RequiredSignatures!); } - else if (IsValue8) + else if (IsPullRequest) { - value8?.Invoke(Value8!); + pullRequest?.Invoke(PullRequest!); } - else if (IsValue9) + else if (IsRequiredStatusChecks) { - value9?.Invoke(Value9!); + requiredStatusChecks?.Invoke(RequiredStatusChecks!); } - else if (IsValue10) + else if (IsNonFastForward) { - value10?.Invoke(Value10!); + nonFastForward?.Invoke(NonFastForward!); } - else if (IsValue11) + else if (IsCommitMessagePattern) { - value11?.Invoke(Value11!); + commitMessagePattern?.Invoke(CommitMessagePattern!); } - else if (IsValue12) + else if (IsCommitAuthorEmailPattern) { - value12?.Invoke(Value12!); + commitAuthorEmailPattern?.Invoke(CommitAuthorEmailPattern!); } - else if (IsValue13) + else if (IsCommitterEmailPattern) { - value13?.Invoke(Value13!); + committerEmailPattern?.Invoke(CommitterEmailPattern!); } - else if (IsValue14) + else if (IsBranchNamePattern) { - value14?.Invoke(Value14!); + branchNamePattern?.Invoke(BranchNamePattern!); } - else if (IsValue15) + else if (IsTagNamePattern) { - value15?.Invoke(Value15!); + tagNamePattern?.Invoke(TagNamePattern!); } - else if (IsValue16) + else if (IsFilePathRestriction) { - value16?.Invoke(Value16!); + filePathRestriction?.Invoke(FilePathRestriction!); } - else if (IsValue17) + else if (IsMaxFilePathLength) { - value17?.Invoke(Value17!); + maxFilePathLength?.Invoke(MaxFilePathLength!); } - else if (IsValue18) + else if (IsFileExtensionRestriction) { - value18?.Invoke(Value18!); + fileExtensionRestriction?.Invoke(FileExtensionRestriction!); } - else if (IsValue19) + else if (IsMaxFileSize) { - value19?.Invoke(Value19!); + maxFileSize?.Invoke(MaxFileSize!); } - else if (IsValue20) + else if (IsWorkflows) { - value20?.Invoke(Value20!); + workflows?.Invoke(Workflows!); } - else if (IsValue21) + else if (IsCodeScanning) { - value21?.Invoke(Value21!); + codeScanning?.Invoke(CodeScanning!); } } @@ -1084,47 +1084,47 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Creation, typeof(global::G.RepositoryRuleCreation), - Value2, + Update, typeof(global::G.RepositoryRuleUpdate), - Value3, + Deletion, typeof(global::G.RepositoryRuleDeletion), - Value4, + RequiredLinearHistory, typeof(global::G.RepositoryRuleRequiredLinearHistory), - Value5, + MergeQueue, typeof(global::G.RepositoryRuleMergeQueue), - Value6, + RequiredDeployments, typeof(global::G.RepositoryRuleRequiredDeployments), - Value7, + RequiredSignatures, typeof(global::G.RepositoryRuleRequiredSignatures), - Value8, + PullRequest, typeof(global::G.RepositoryRulePullRequest), - Value9, + RequiredStatusChecks, typeof(global::G.RepositoryRuleRequiredStatusChecks), - Value10, + NonFastForward, typeof(global::G.RepositoryRuleNonFastForward), - Value11, + CommitMessagePattern, typeof(global::G.RepositoryRuleCommitMessagePattern), - Value12, + CommitAuthorEmailPattern, typeof(global::G.RepositoryRuleCommitAuthorEmailPattern), - Value13, + CommitterEmailPattern, typeof(global::G.RepositoryRuleCommitterEmailPattern), - Value14, + BranchNamePattern, typeof(global::G.RepositoryRuleBranchNamePattern), - Value15, + TagNamePattern, typeof(global::G.RepositoryRuleTagNamePattern), - Value16, + FilePathRestriction, typeof(global::G.RepositoryRuleVariant16), - Value17, + MaxFilePathLength, typeof(global::G.RepositoryRuleVariant17), - Value18, + FileExtensionRestriction, typeof(global::G.RepositoryRuleVariant18), - Value19, + MaxFileSize, typeof(global::G.RepositoryRuleVariant19), - Value20, + Workflows, typeof(global::G.RepositoryRuleWorkflows), - Value21, + CodeScanning, typeof(global::G.RepositoryRuleCodeScanning), }; const int offset = unchecked((int)2166136261); @@ -1141,27 +1141,27 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoryRule 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(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value11, other.Value11) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value12, other.Value12) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value13, other.Value13) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value14, other.Value14) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value15, other.Value15) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value16, other.Value16) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value17, other.Value17) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value18, other.Value18) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value19, other.Value19) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value20, other.Value20) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value21, other.Value21) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Creation, other.Creation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Update, other.Update) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Deletion, other.Deletion) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredLinearHistory, other.RequiredLinearHistory) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MergeQueue, other.MergeQueue) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredDeployments, other.RequiredDeployments) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredSignatures, other.RequiredSignatures) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PullRequest, other.PullRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredStatusChecks, other.RequiredStatusChecks) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(NonFastForward, other.NonFastForward) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitMessagePattern, other.CommitMessagePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitAuthorEmailPattern, other.CommitAuthorEmailPattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitterEmailPattern, other.CommitterEmailPattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(BranchNamePattern, other.BranchNamePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TagNamePattern, other.TagNamePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePathRestriction, other.FilePathRestriction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaxFilePathLength, other.MaxFilePathLength) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileExtensionRestriction, other.FileExtensionRestriction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaxFileSize, other.MaxFileSize) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Workflows, other.Workflows) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeScanning, other.CodeScanning) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#G.Models.RepositoryRule.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#G.Models.RepositoryRule.g.verified.cs index b25115d9f8..542e957f42 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#G.Models.RepositoryRule.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#G.Models.RepositoryRule.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Only allow users with bypass permission to create matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCreation? Value1 { get; init; } + public global::G.RepositoryRuleCreation? Creation { get; init; } #else - public global::G.RepositoryRuleCreation? Value1 { get; } + public global::G.RepositoryRuleCreation? Creation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Creation))] #endif - public bool IsValue1 => Value1 != null; + public bool IsCreation => Creation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RepositoryRuleCreation?(RepositoryRule @this) => @this.Value1; + public static implicit operator global::G.RepositoryRuleCreation?(RepositoryRule @this) => @this.Creation; /// /// /// public RepositoryRule(global::G.RepositoryRuleCreation? value) { - Value1 = value; + Creation = value; } /// /// Only allow users with bypass permission to update matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleUpdate? Value2 { get; init; } + public global::G.RepositoryRuleUpdate? Update { get; init; } #else - public global::G.RepositoryRuleUpdate? Value2 { get; } + public global::G.RepositoryRuleUpdate? Update { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Update))] #endif - public bool IsValue2 => Value2 != null; + public bool IsUpdate => Update != null; /// /// @@ -76,32 +76,32 @@ public RepositoryRule(global::G.RepositoryRuleCreation? value) /// /// /// - public static implicit operator global::G.RepositoryRuleUpdate?(RepositoryRule @this) => @this.Value2; + public static implicit operator global::G.RepositoryRuleUpdate?(RepositoryRule @this) => @this.Update; /// /// /// public RepositoryRule(global::G.RepositoryRuleUpdate? value) { - Value2 = value; + Update = value; } /// /// Only allow users with bypass permissions to delete matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleDeletion? Value3 { get; init; } + public global::G.RepositoryRuleDeletion? Deletion { get; init; } #else - public global::G.RepositoryRuleDeletion? Value3 { get; } + public global::G.RepositoryRuleDeletion? Deletion { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Deletion))] #endif - public bool IsValue3 => Value3 != null; + public bool IsDeletion => Deletion != null; /// /// @@ -111,32 +111,32 @@ public RepositoryRule(global::G.RepositoryRuleUpdate? value) /// /// /// - public static implicit operator global::G.RepositoryRuleDeletion?(RepositoryRule @this) => @this.Value3; + public static implicit operator global::G.RepositoryRuleDeletion?(RepositoryRule @this) => @this.Deletion; /// /// /// public RepositoryRule(global::G.RepositoryRuleDeletion? value) { - Value3 = value; + Deletion = value; } /// /// Prevent merge commits from being pushed to matching refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredLinearHistory? Value4 { get; init; } + public global::G.RepositoryRuleRequiredLinearHistory? RequiredLinearHistory { get; init; } #else - public global::G.RepositoryRuleRequiredLinearHistory? Value4 { get; } + public global::G.RepositoryRuleRequiredLinearHistory? RequiredLinearHistory { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredLinearHistory))] #endif - public bool IsValue4 => Value4 != null; + public bool IsRequiredLinearHistory => RequiredLinearHistory != null; /// /// @@ -146,32 +146,32 @@ public RepositoryRule(global::G.RepositoryRuleDeletion? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredLinearHistory?(RepositoryRule @this) => @this.Value4; + public static implicit operator global::G.RepositoryRuleRequiredLinearHistory?(RepositoryRule @this) => @this.RequiredLinearHistory; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredLinearHistory? value) { - Value4 = value; + RequiredLinearHistory = value; } /// /// Merges must be performed via a merge queue. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleMergeQueue? Value5 { get; init; } + public global::G.RepositoryRuleMergeQueue? MergeQueue { get; init; } #else - public global::G.RepositoryRuleMergeQueue? Value5 { get; } + public global::G.RepositoryRuleMergeQueue? MergeQueue { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MergeQueue))] #endif - public bool IsValue5 => Value5 != null; + public bool IsMergeQueue => MergeQueue != null; /// /// @@ -181,32 +181,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredLinearHistory? value) /// /// /// - public static implicit operator global::G.RepositoryRuleMergeQueue?(RepositoryRule @this) => @this.Value5; + public static implicit operator global::G.RepositoryRuleMergeQueue?(RepositoryRule @this) => @this.MergeQueue; /// /// /// public RepositoryRule(global::G.RepositoryRuleMergeQueue? value) { - Value5 = value; + MergeQueue = value; } /// /// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredDeployments? Value6 { get; init; } + public global::G.RepositoryRuleRequiredDeployments? RequiredDeployments { get; init; } #else - public global::G.RepositoryRuleRequiredDeployments? Value6 { get; } + public global::G.RepositoryRuleRequiredDeployments? RequiredDeployments { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredDeployments))] #endif - public bool IsValue6 => Value6 != null; + public bool IsRequiredDeployments => RequiredDeployments != null; /// /// @@ -216,32 +216,32 @@ public RepositoryRule(global::G.RepositoryRuleMergeQueue? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredDeployments?(RepositoryRule @this) => @this.Value6; + public static implicit operator global::G.RepositoryRuleRequiredDeployments?(RepositoryRule @this) => @this.RequiredDeployments; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredDeployments? value) { - Value6 = value; + RequiredDeployments = value; } /// /// Commits pushed to matching refs must have verified signatures. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredSignatures? Value7 { get; init; } + public global::G.RepositoryRuleRequiredSignatures? RequiredSignatures { get; init; } #else - public global::G.RepositoryRuleRequiredSignatures? Value7 { get; } + public global::G.RepositoryRuleRequiredSignatures? RequiredSignatures { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredSignatures))] #endif - public bool IsValue7 => Value7 != null; + public bool IsRequiredSignatures => RequiredSignatures != null; /// /// @@ -251,32 +251,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredDeployments? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredSignatures?(RepositoryRule @this) => @this.Value7; + public static implicit operator global::G.RepositoryRuleRequiredSignatures?(RepositoryRule @this) => @this.RequiredSignatures; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredSignatures? value) { - Value7 = value; + RequiredSignatures = value; } /// /// Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRulePullRequest? Value8 { get; init; } + public global::G.RepositoryRulePullRequest? PullRequest { get; init; } #else - public global::G.RepositoryRulePullRequest? Value8 { get; } + public global::G.RepositoryRulePullRequest? PullRequest { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(PullRequest))] #endif - public bool IsValue8 => Value8 != null; + public bool IsPullRequest => PullRequest != null; /// /// @@ -286,32 +286,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredSignatures? value) /// /// /// - public static implicit operator global::G.RepositoryRulePullRequest?(RepositoryRule @this) => @this.Value8; + public static implicit operator global::G.RepositoryRulePullRequest?(RepositoryRule @this) => @this.PullRequest; /// /// /// public RepositoryRule(global::G.RepositoryRulePullRequest? value) { - Value8 = value; + PullRequest = value; } /// /// Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleRequiredStatusChecks? Value9 { get; init; } + public global::G.RepositoryRuleRequiredStatusChecks? RequiredStatusChecks { get; init; } #else - public global::G.RepositoryRuleRequiredStatusChecks? Value9 { get; } + public global::G.RepositoryRuleRequiredStatusChecks? RequiredStatusChecks { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RequiredStatusChecks))] #endif - public bool IsValue9 => Value9 != null; + public bool IsRequiredStatusChecks => RequiredStatusChecks != null; /// /// @@ -321,32 +321,32 @@ public RepositoryRule(global::G.RepositoryRulePullRequest? value) /// /// /// - public static implicit operator global::G.RepositoryRuleRequiredStatusChecks?(RepositoryRule @this) => @this.Value9; + public static implicit operator global::G.RepositoryRuleRequiredStatusChecks?(RepositoryRule @this) => @this.RequiredStatusChecks; /// /// /// public RepositoryRule(global::G.RepositoryRuleRequiredStatusChecks? value) { - Value9 = value; + RequiredStatusChecks = value; } /// /// Prevent users with push access from force pushing to refs. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleNonFastForward? Value10 { get; init; } + public global::G.RepositoryRuleNonFastForward? NonFastForward { get; init; } #else - public global::G.RepositoryRuleNonFastForward? Value10 { get; } + public global::G.RepositoryRuleNonFastForward? NonFastForward { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(NonFastForward))] #endif - public bool IsValue10 => Value10 != null; + public bool IsNonFastForward => NonFastForward != null; /// /// @@ -356,32 +356,32 @@ public RepositoryRule(global::G.RepositoryRuleRequiredStatusChecks? value) /// /// /// - public static implicit operator global::G.RepositoryRuleNonFastForward?(RepositoryRule @this) => @this.Value10; + public static implicit operator global::G.RepositoryRuleNonFastForward?(RepositoryRule @this) => @this.NonFastForward; /// /// /// public RepositoryRule(global::G.RepositoryRuleNonFastForward? value) { - Value10 = value; + NonFastForward = value; } /// /// Parameters to be used for the commit_message_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitMessagePattern? Value11 { get; init; } + public global::G.RepositoryRuleCommitMessagePattern? CommitMessagePattern { get; init; } #else - public global::G.RepositoryRuleCommitMessagePattern? Value11 { get; } + public global::G.RepositoryRuleCommitMessagePattern? CommitMessagePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value11))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitMessagePattern))] #endif - public bool IsValue11 => Value11 != null; + public bool IsCommitMessagePattern => CommitMessagePattern != null; /// /// @@ -391,32 +391,32 @@ public RepositoryRule(global::G.RepositoryRuleNonFastForward? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitMessagePattern?(RepositoryRule @this) => @this.Value11; + public static implicit operator global::G.RepositoryRuleCommitMessagePattern?(RepositoryRule @this) => @this.CommitMessagePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitMessagePattern? value) { - Value11 = value; + CommitMessagePattern = value; } /// /// Parameters to be used for the commit_author_email_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitAuthorEmailPattern? Value12 { get; init; } + public global::G.RepositoryRuleCommitAuthorEmailPattern? CommitAuthorEmailPattern { get; init; } #else - public global::G.RepositoryRuleCommitAuthorEmailPattern? Value12 { get; } + public global::G.RepositoryRuleCommitAuthorEmailPattern? CommitAuthorEmailPattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value12))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitAuthorEmailPattern))] #endif - public bool IsValue12 => Value12 != null; + public bool IsCommitAuthorEmailPattern => CommitAuthorEmailPattern != null; /// /// @@ -426,32 +426,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitMessagePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitAuthorEmailPattern?(RepositoryRule @this) => @this.Value12; + public static implicit operator global::G.RepositoryRuleCommitAuthorEmailPattern?(RepositoryRule @this) => @this.CommitAuthorEmailPattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitAuthorEmailPattern? value) { - Value12 = value; + CommitAuthorEmailPattern = value; } /// /// Parameters to be used for the committer_email_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCommitterEmailPattern? Value13 { get; init; } + public global::G.RepositoryRuleCommitterEmailPattern? CommitterEmailPattern { get; init; } #else - public global::G.RepositoryRuleCommitterEmailPattern? Value13 { get; } + public global::G.RepositoryRuleCommitterEmailPattern? CommitterEmailPattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value13))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CommitterEmailPattern))] #endif - public bool IsValue13 => Value13 != null; + public bool IsCommitterEmailPattern => CommitterEmailPattern != null; /// /// @@ -461,32 +461,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitAuthorEmailPattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCommitterEmailPattern?(RepositoryRule @this) => @this.Value13; + public static implicit operator global::G.RepositoryRuleCommitterEmailPattern?(RepositoryRule @this) => @this.CommitterEmailPattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleCommitterEmailPattern? value) { - Value13 = value; + CommitterEmailPattern = value; } /// /// Parameters to be used for the branch_name_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleBranchNamePattern? Value14 { get; init; } + public global::G.RepositoryRuleBranchNamePattern? BranchNamePattern { get; init; } #else - public global::G.RepositoryRuleBranchNamePattern? Value14 { get; } + public global::G.RepositoryRuleBranchNamePattern? BranchNamePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value14))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BranchNamePattern))] #endif - public bool IsValue14 => Value14 != null; + public bool IsBranchNamePattern => BranchNamePattern != null; /// /// @@ -496,32 +496,32 @@ public RepositoryRule(global::G.RepositoryRuleCommitterEmailPattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleBranchNamePattern?(RepositoryRule @this) => @this.Value14; + public static implicit operator global::G.RepositoryRuleBranchNamePattern?(RepositoryRule @this) => @this.BranchNamePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleBranchNamePattern? value) { - Value14 = value; + BranchNamePattern = value; } /// /// Parameters to be used for the tag_name_pattern rule /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleTagNamePattern? Value15 { get; init; } + public global::G.RepositoryRuleTagNamePattern? TagNamePattern { get; init; } #else - public global::G.RepositoryRuleTagNamePattern? Value15 { get; } + public global::G.RepositoryRuleTagNamePattern? TagNamePattern { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value15))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TagNamePattern))] #endif - public bool IsValue15 => Value15 != null; + public bool IsTagNamePattern => TagNamePattern != null; /// /// @@ -531,32 +531,32 @@ public RepositoryRule(global::G.RepositoryRuleBranchNamePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleTagNamePattern?(RepositoryRule @this) => @this.Value15; + public static implicit operator global::G.RepositoryRuleTagNamePattern?(RepositoryRule @this) => @this.TagNamePattern; /// /// /// public RepositoryRule(global::G.RepositoryRuleTagNamePattern? value) { - Value15 = value; + TagNamePattern = value; } /// /// Prevent commits that include changes in specified file paths from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant16? Value16 { get; init; } + public global::G.RepositoryRuleVariant16? FilePathRestriction { get; init; } #else - public global::G.RepositoryRuleVariant16? Value16 { get; } + public global::G.RepositoryRuleVariant16? FilePathRestriction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value16))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePathRestriction))] #endif - public bool IsValue16 => Value16 != null; + public bool IsFilePathRestriction => FilePathRestriction != null; /// /// @@ -566,32 +566,32 @@ public RepositoryRule(global::G.RepositoryRuleTagNamePattern? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant16?(RepositoryRule @this) => @this.Value16; + public static implicit operator global::G.RepositoryRuleVariant16?(RepositoryRule @this) => @this.FilePathRestriction; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant16? value) { - Value16 = value; + FilePathRestriction = value; } /// /// Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant17? Value17 { get; init; } + public global::G.RepositoryRuleVariant17? MaxFilePathLength { get; init; } #else - public global::G.RepositoryRuleVariant17? Value17 { get; } + public global::G.RepositoryRuleVariant17? MaxFilePathLength { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value17))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaxFilePathLength))] #endif - public bool IsValue17 => Value17 != null; + public bool IsMaxFilePathLength => MaxFilePathLength != null; /// /// @@ -601,32 +601,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant16? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant17?(RepositoryRule @this) => @this.Value17; + public static implicit operator global::G.RepositoryRuleVariant17?(RepositoryRule @this) => @this.MaxFilePathLength; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant17? value) { - Value17 = value; + MaxFilePathLength = value; } /// /// Prevent commits that include files with specified file extensions from being pushed to the commit graph. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant18? Value18 { get; init; } + public global::G.RepositoryRuleVariant18? FileExtensionRestriction { get; init; } #else - public global::G.RepositoryRuleVariant18? Value18 { get; } + public global::G.RepositoryRuleVariant18? FileExtensionRestriction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value18))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileExtensionRestriction))] #endif - public bool IsValue18 => Value18 != null; + public bool IsFileExtensionRestriction => FileExtensionRestriction != null; /// /// @@ -636,32 +636,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant17? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant18?(RepositoryRule @this) => @this.Value18; + public static implicit operator global::G.RepositoryRuleVariant18?(RepositoryRule @this) => @this.FileExtensionRestriction; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant18? value) { - Value18 = value; + FileExtensionRestriction = value; } /// /// Prevent commits that exceed a specified file size limit from being pushed to the commit. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleVariant19? Value19 { get; init; } + public global::G.RepositoryRuleVariant19? MaxFileSize { get; init; } #else - public global::G.RepositoryRuleVariant19? Value19 { get; } + public global::G.RepositoryRuleVariant19? MaxFileSize { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value19))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MaxFileSize))] #endif - public bool IsValue19 => Value19 != null; + public bool IsMaxFileSize => MaxFileSize != null; /// /// @@ -671,32 +671,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant18? value) /// /// /// - public static implicit operator global::G.RepositoryRuleVariant19?(RepositoryRule @this) => @this.Value19; + public static implicit operator global::G.RepositoryRuleVariant19?(RepositoryRule @this) => @this.MaxFileSize; /// /// /// public RepositoryRule(global::G.RepositoryRuleVariant19? value) { - Value19 = value; + MaxFileSize = value; } /// /// Require all changes made to a targeted branch to pass the specified workflows before they can be merged. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleWorkflows? Value20 { get; init; } + public global::G.RepositoryRuleWorkflows? Workflows { get; init; } #else - public global::G.RepositoryRuleWorkflows? Value20 { get; } + public global::G.RepositoryRuleWorkflows? Workflows { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value20))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Workflows))] #endif - public bool IsValue20 => Value20 != null; + public bool IsWorkflows => Workflows != null; /// /// @@ -706,32 +706,32 @@ public RepositoryRule(global::G.RepositoryRuleVariant19? value) /// /// /// - public static implicit operator global::G.RepositoryRuleWorkflows?(RepositoryRule @this) => @this.Value20; + public static implicit operator global::G.RepositoryRuleWorkflows?(RepositoryRule @this) => @this.Workflows; /// /// /// public RepositoryRule(global::G.RepositoryRuleWorkflows? value) { - Value20 = value; + Workflows = value; } /// /// Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. /// #if NET6_0_OR_GREATER - public global::G.RepositoryRuleCodeScanning? Value21 { get; init; } + public global::G.RepositoryRuleCodeScanning? CodeScanning { get; init; } #else - public global::G.RepositoryRuleCodeScanning? Value21 { get; } + public global::G.RepositoryRuleCodeScanning? CodeScanning { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeScanning))] #endif - public bool IsValue21 => Value21 != null; + public bool IsCodeScanning => CodeScanning != null; /// /// @@ -741,14 +741,14 @@ public RepositoryRule(global::G.RepositoryRuleWorkflows? value) /// /// /// - public static implicit operator global::G.RepositoryRuleCodeScanning?(RepositoryRule @this) => @this.Value21; + public static implicit operator global::G.RepositoryRuleCodeScanning?(RepositoryRule @this) => @this.CodeScanning; /// /// /// public RepositoryRule(global::G.RepositoryRuleCodeScanning? value) { - Value21 = value; + CodeScanning = value; } /// @@ -756,79 +756,79 @@ public RepositoryRule(global::G.RepositoryRuleCodeScanning? value) /// public RepositoryRule( global::G.RepositoryRuleDiscriminatorType? type, - global::G.RepositoryRuleCreation? value1, - global::G.RepositoryRuleUpdate? value2, - global::G.RepositoryRuleDeletion? value3, - global::G.RepositoryRuleRequiredLinearHistory? value4, - global::G.RepositoryRuleMergeQueue? value5, - global::G.RepositoryRuleRequiredDeployments? value6, - global::G.RepositoryRuleRequiredSignatures? value7, - global::G.RepositoryRulePullRequest? value8, - global::G.RepositoryRuleRequiredStatusChecks? value9, - global::G.RepositoryRuleNonFastForward? value10, - global::G.RepositoryRuleCommitMessagePattern? value11, - global::G.RepositoryRuleCommitAuthorEmailPattern? value12, - global::G.RepositoryRuleCommitterEmailPattern? value13, - global::G.RepositoryRuleBranchNamePattern? value14, - global::G.RepositoryRuleTagNamePattern? value15, - global::G.RepositoryRuleVariant16? value16, - global::G.RepositoryRuleVariant17? value17, - global::G.RepositoryRuleVariant18? value18, - global::G.RepositoryRuleVariant19? value19, - global::G.RepositoryRuleWorkflows? value20, - global::G.RepositoryRuleCodeScanning? value21 + global::G.RepositoryRuleCreation? creation, + global::G.RepositoryRuleUpdate? update, + global::G.RepositoryRuleDeletion? deletion, + global::G.RepositoryRuleRequiredLinearHistory? requiredLinearHistory, + global::G.RepositoryRuleMergeQueue? mergeQueue, + global::G.RepositoryRuleRequiredDeployments? requiredDeployments, + global::G.RepositoryRuleRequiredSignatures? requiredSignatures, + global::G.RepositoryRulePullRequest? pullRequest, + global::G.RepositoryRuleRequiredStatusChecks? requiredStatusChecks, + global::G.RepositoryRuleNonFastForward? nonFastForward, + global::G.RepositoryRuleCommitMessagePattern? commitMessagePattern, + global::G.RepositoryRuleCommitAuthorEmailPattern? commitAuthorEmailPattern, + global::G.RepositoryRuleCommitterEmailPattern? committerEmailPattern, + global::G.RepositoryRuleBranchNamePattern? branchNamePattern, + global::G.RepositoryRuleTagNamePattern? tagNamePattern, + global::G.RepositoryRuleVariant16? filePathRestriction, + global::G.RepositoryRuleVariant17? maxFilePathLength, + global::G.RepositoryRuleVariant18? fileExtensionRestriction, + global::G.RepositoryRuleVariant19? maxFileSize, + global::G.RepositoryRuleWorkflows? workflows, + global::G.RepositoryRuleCodeScanning? codeScanning ) { Type = type; - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - Value8 = value8; - Value9 = value9; - Value10 = value10; - Value11 = value11; - Value12 = value12; - Value13 = value13; - Value14 = value14; - Value15 = value15; - Value16 = value16; - Value17 = value17; - Value18 = value18; - Value19 = value19; - Value20 = value20; - Value21 = value21; + Creation = creation; + Update = update; + Deletion = deletion; + RequiredLinearHistory = requiredLinearHistory; + MergeQueue = mergeQueue; + RequiredDeployments = requiredDeployments; + RequiredSignatures = requiredSignatures; + PullRequest = pullRequest; + RequiredStatusChecks = requiredStatusChecks; + NonFastForward = nonFastForward; + CommitMessagePattern = commitMessagePattern; + CommitAuthorEmailPattern = commitAuthorEmailPattern; + CommitterEmailPattern = committerEmailPattern; + BranchNamePattern = branchNamePattern; + TagNamePattern = tagNamePattern; + FilePathRestriction = filePathRestriction; + MaxFilePathLength = maxFilePathLength; + FileExtensionRestriction = fileExtensionRestriction; + MaxFileSize = maxFileSize; + Workflows = workflows; + CodeScanning = codeScanning; } /// /// /// public object? Object => - Value21 as object ?? - Value20 as object ?? - Value19 as object ?? - Value18 as object ?? - Value17 as object ?? - Value16 as object ?? - Value15 as object ?? - Value14 as object ?? - Value13 as object ?? - Value12 as object ?? - Value11 as object ?? - Value10 as object ?? - Value9 as object ?? - Value8 as object ?? - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object + CodeScanning as object ?? + Workflows as object ?? + MaxFileSize as object ?? + FileExtensionRestriction as object ?? + MaxFilePathLength as object ?? + FilePathRestriction as object ?? + TagNamePattern as object ?? + BranchNamePattern as object ?? + CommitterEmailPattern as object ?? + CommitAuthorEmailPattern as object ?? + CommitMessagePattern as object ?? + NonFastForward as object ?? + RequiredStatusChecks as object ?? + PullRequest as object ?? + RequiredSignatures as object ?? + RequiredDeployments as object ?? + MergeQueue as object ?? + RequiredLinearHistory as object ?? + Deletion as object ?? + Update as object ?? + Creation as object ; /// @@ -836,34 +836,34 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && IsValue19 && !IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && IsValue20 && !IsValue21 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && IsValue21; + return IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && IsMaxFileSize && !IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && IsWorkflows && !IsCodeScanning || !IsCreation && !IsUpdate && !IsDeletion && !IsRequiredLinearHistory && !IsMergeQueue && !IsRequiredDeployments && !IsRequiredSignatures && !IsPullRequest && !IsRequiredStatusChecks && !IsNonFastForward && !IsCommitMessagePattern && !IsCommitAuthorEmailPattern && !IsCommitterEmailPattern && !IsBranchNamePattern && !IsTagNamePattern && !IsFilePathRestriction && !IsMaxFilePathLength && !IsFileExtensionRestriction && !IsMaxFileSize && !IsWorkflows && IsCodeScanning; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - global::System.Func? value8 = null, - global::System.Func? value9 = null, - global::System.Func? value10 = null, - global::System.Func? value11 = null, - global::System.Func? value12 = null, - global::System.Func? value13 = null, - global::System.Func? value14 = null, - global::System.Func? value15 = null, - global::System.Func? value16 = null, - global::System.Func? value17 = null, - global::System.Func? value18 = null, - global::System.Func? value19 = null, - global::System.Func? value20 = null, - global::System.Func? value21 = null, + global::System.Func? creation = null, + global::System.Func? update = null, + global::System.Func? deletion = null, + global::System.Func? requiredLinearHistory = null, + global::System.Func? mergeQueue = null, + global::System.Func? requiredDeployments = null, + global::System.Func? requiredSignatures = null, + global::System.Func? pullRequest = null, + global::System.Func? requiredStatusChecks = null, + global::System.Func? nonFastForward = null, + global::System.Func? commitMessagePattern = null, + global::System.Func? commitAuthorEmailPattern = null, + global::System.Func? committerEmailPattern = null, + global::System.Func? branchNamePattern = null, + global::System.Func? tagNamePattern = null, + global::System.Func? filePathRestriction = null, + global::System.Func? maxFilePathLength = null, + global::System.Func? fileExtensionRestriction = null, + global::System.Func? maxFileSize = null, + global::System.Func? workflows = null, + global::System.Func? codeScanning = null, bool validate = true) { if (validate) @@ -871,89 +871,89 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsCreation && creation != null) { - return value1(Value1!); + return creation(Creation!); } - else if (IsValue2 && value2 != null) + else if (IsUpdate && update != null) { - return value2(Value2!); + return update(Update!); } - else if (IsValue3 && value3 != null) + else if (IsDeletion && deletion != null) { - return value3(Value3!); + return deletion(Deletion!); } - else if (IsValue4 && value4 != null) + else if (IsRequiredLinearHistory && requiredLinearHistory != null) { - return value4(Value4!); + return requiredLinearHistory(RequiredLinearHistory!); } - else if (IsValue5 && value5 != null) + else if (IsMergeQueue && mergeQueue != null) { - return value5(Value5!); + return mergeQueue(MergeQueue!); } - else if (IsValue6 && value6 != null) + else if (IsRequiredDeployments && requiredDeployments != null) { - return value6(Value6!); + return requiredDeployments(RequiredDeployments!); } - else if (IsValue7 && value7 != null) + else if (IsRequiredSignatures && requiredSignatures != null) { - return value7(Value7!); + return requiredSignatures(RequiredSignatures!); } - else if (IsValue8 && value8 != null) + else if (IsPullRequest && pullRequest != null) { - return value8(Value8!); + return pullRequest(PullRequest!); } - else if (IsValue9 && value9 != null) + else if (IsRequiredStatusChecks && requiredStatusChecks != null) { - return value9(Value9!); + return requiredStatusChecks(RequiredStatusChecks!); } - else if (IsValue10 && value10 != null) + else if (IsNonFastForward && nonFastForward != null) { - return value10(Value10!); + return nonFastForward(NonFastForward!); } - else if (IsValue11 && value11 != null) + else if (IsCommitMessagePattern && commitMessagePattern != null) { - return value11(Value11!); + return commitMessagePattern(CommitMessagePattern!); } - else if (IsValue12 && value12 != null) + else if (IsCommitAuthorEmailPattern && commitAuthorEmailPattern != null) { - return value12(Value12!); + return commitAuthorEmailPattern(CommitAuthorEmailPattern!); } - else if (IsValue13 && value13 != null) + else if (IsCommitterEmailPattern && committerEmailPattern != null) { - return value13(Value13!); + return committerEmailPattern(CommitterEmailPattern!); } - else if (IsValue14 && value14 != null) + else if (IsBranchNamePattern && branchNamePattern != null) { - return value14(Value14!); + return branchNamePattern(BranchNamePattern!); } - else if (IsValue15 && value15 != null) + else if (IsTagNamePattern && tagNamePattern != null) { - return value15(Value15!); + return tagNamePattern(TagNamePattern!); } - else if (IsValue16 && value16 != null) + else if (IsFilePathRestriction && filePathRestriction != null) { - return value16(Value16!); + return filePathRestriction(FilePathRestriction!); } - else if (IsValue17 && value17 != null) + else if (IsMaxFilePathLength && maxFilePathLength != null) { - return value17(Value17!); + return maxFilePathLength(MaxFilePathLength!); } - else if (IsValue18 && value18 != null) + else if (IsFileExtensionRestriction && fileExtensionRestriction != null) { - return value18(Value18!); + return fileExtensionRestriction(FileExtensionRestriction!); } - else if (IsValue19 && value19 != null) + else if (IsMaxFileSize && maxFileSize != null) { - return value19(Value19!); + return maxFileSize(MaxFileSize!); } - else if (IsValue20 && value20 != null) + else if (IsWorkflows && workflows != null) { - return value20(Value20!); + return workflows(Workflows!); } - else if (IsValue21 && value21 != null) + else if (IsCodeScanning && codeScanning != null) { - return value21(Value21!); + return codeScanning(CodeScanning!); } return default(TResult); @@ -963,27 +963,27 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - global::System.Action? value8 = null, - global::System.Action? value9 = null, - global::System.Action? value10 = null, - global::System.Action? value11 = null, - global::System.Action? value12 = null, - global::System.Action? value13 = null, - global::System.Action? value14 = null, - global::System.Action? value15 = null, - global::System.Action? value16 = null, - global::System.Action? value17 = null, - global::System.Action? value18 = null, - global::System.Action? value19 = null, - global::System.Action? value20 = null, - global::System.Action? value21 = null, + global::System.Action? creation = null, + global::System.Action? update = null, + global::System.Action? deletion = null, + global::System.Action? requiredLinearHistory = null, + global::System.Action? mergeQueue = null, + global::System.Action? requiredDeployments = null, + global::System.Action? requiredSignatures = null, + global::System.Action? pullRequest = null, + global::System.Action? requiredStatusChecks = null, + global::System.Action? nonFastForward = null, + global::System.Action? commitMessagePattern = null, + global::System.Action? commitAuthorEmailPattern = null, + global::System.Action? committerEmailPattern = null, + global::System.Action? branchNamePattern = null, + global::System.Action? tagNamePattern = null, + global::System.Action? filePathRestriction = null, + global::System.Action? maxFilePathLength = null, + global::System.Action? fileExtensionRestriction = null, + global::System.Action? maxFileSize = null, + global::System.Action? workflows = null, + global::System.Action? codeScanning = null, bool validate = true) { if (validate) @@ -991,89 +991,89 @@ public void Match( Validate(); } - if (IsValue1) + if (IsCreation) { - value1?.Invoke(Value1!); + creation?.Invoke(Creation!); } - else if (IsValue2) + else if (IsUpdate) { - value2?.Invoke(Value2!); + update?.Invoke(Update!); } - else if (IsValue3) + else if (IsDeletion) { - value3?.Invoke(Value3!); + deletion?.Invoke(Deletion!); } - else if (IsValue4) + else if (IsRequiredLinearHistory) { - value4?.Invoke(Value4!); + requiredLinearHistory?.Invoke(RequiredLinearHistory!); } - else if (IsValue5) + else if (IsMergeQueue) { - value5?.Invoke(Value5!); + mergeQueue?.Invoke(MergeQueue!); } - else if (IsValue6) + else if (IsRequiredDeployments) { - value6?.Invoke(Value6!); + requiredDeployments?.Invoke(RequiredDeployments!); } - else if (IsValue7) + else if (IsRequiredSignatures) { - value7?.Invoke(Value7!); + requiredSignatures?.Invoke(RequiredSignatures!); } - else if (IsValue8) + else if (IsPullRequest) { - value8?.Invoke(Value8!); + pullRequest?.Invoke(PullRequest!); } - else if (IsValue9) + else if (IsRequiredStatusChecks) { - value9?.Invoke(Value9!); + requiredStatusChecks?.Invoke(RequiredStatusChecks!); } - else if (IsValue10) + else if (IsNonFastForward) { - value10?.Invoke(Value10!); + nonFastForward?.Invoke(NonFastForward!); } - else if (IsValue11) + else if (IsCommitMessagePattern) { - value11?.Invoke(Value11!); + commitMessagePattern?.Invoke(CommitMessagePattern!); } - else if (IsValue12) + else if (IsCommitAuthorEmailPattern) { - value12?.Invoke(Value12!); + commitAuthorEmailPattern?.Invoke(CommitAuthorEmailPattern!); } - else if (IsValue13) + else if (IsCommitterEmailPattern) { - value13?.Invoke(Value13!); + committerEmailPattern?.Invoke(CommitterEmailPattern!); } - else if (IsValue14) + else if (IsBranchNamePattern) { - value14?.Invoke(Value14!); + branchNamePattern?.Invoke(BranchNamePattern!); } - else if (IsValue15) + else if (IsTagNamePattern) { - value15?.Invoke(Value15!); + tagNamePattern?.Invoke(TagNamePattern!); } - else if (IsValue16) + else if (IsFilePathRestriction) { - value16?.Invoke(Value16!); + filePathRestriction?.Invoke(FilePathRestriction!); } - else if (IsValue17) + else if (IsMaxFilePathLength) { - value17?.Invoke(Value17!); + maxFilePathLength?.Invoke(MaxFilePathLength!); } - else if (IsValue18) + else if (IsFileExtensionRestriction) { - value18?.Invoke(Value18!); + fileExtensionRestriction?.Invoke(FileExtensionRestriction!); } - else if (IsValue19) + else if (IsMaxFileSize) { - value19?.Invoke(Value19!); + maxFileSize?.Invoke(MaxFileSize!); } - else if (IsValue20) + else if (IsWorkflows) { - value20?.Invoke(Value20!); + workflows?.Invoke(Workflows!); } - else if (IsValue21) + else if (IsCodeScanning) { - value21?.Invoke(Value21!); + codeScanning?.Invoke(CodeScanning!); } } @@ -1084,47 +1084,47 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Creation, typeof(global::G.RepositoryRuleCreation), - Value2, + Update, typeof(global::G.RepositoryRuleUpdate), - Value3, + Deletion, typeof(global::G.RepositoryRuleDeletion), - Value4, + RequiredLinearHistory, typeof(global::G.RepositoryRuleRequiredLinearHistory), - Value5, + MergeQueue, typeof(global::G.RepositoryRuleMergeQueue), - Value6, + RequiredDeployments, typeof(global::G.RepositoryRuleRequiredDeployments), - Value7, + RequiredSignatures, typeof(global::G.RepositoryRuleRequiredSignatures), - Value8, + PullRequest, typeof(global::G.RepositoryRulePullRequest), - Value9, + RequiredStatusChecks, typeof(global::G.RepositoryRuleRequiredStatusChecks), - Value10, + NonFastForward, typeof(global::G.RepositoryRuleNonFastForward), - Value11, + CommitMessagePattern, typeof(global::G.RepositoryRuleCommitMessagePattern), - Value12, + CommitAuthorEmailPattern, typeof(global::G.RepositoryRuleCommitAuthorEmailPattern), - Value13, + CommitterEmailPattern, typeof(global::G.RepositoryRuleCommitterEmailPattern), - Value14, + BranchNamePattern, typeof(global::G.RepositoryRuleBranchNamePattern), - Value15, + TagNamePattern, typeof(global::G.RepositoryRuleTagNamePattern), - Value16, + FilePathRestriction, typeof(global::G.RepositoryRuleVariant16), - Value17, + MaxFilePathLength, typeof(global::G.RepositoryRuleVariant17), - Value18, + FileExtensionRestriction, typeof(global::G.RepositoryRuleVariant18), - Value19, + MaxFileSize, typeof(global::G.RepositoryRuleVariant19), - Value20, + Workflows, typeof(global::G.RepositoryRuleWorkflows), - Value21, + CodeScanning, typeof(global::G.RepositoryRuleCodeScanning), }; const int offset = unchecked((int)2166136261); @@ -1141,27 +1141,27 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoryRule 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(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value11, other.Value11) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value12, other.Value12) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value13, other.Value13) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value14, other.Value14) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value15, other.Value15) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value16, other.Value16) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value17, other.Value17) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value18, other.Value18) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value19, other.Value19) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value20, other.Value20) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value21, other.Value21) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Creation, other.Creation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Update, other.Update) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Deletion, other.Deletion) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredLinearHistory, other.RequiredLinearHistory) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MergeQueue, other.MergeQueue) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredDeployments, other.RequiredDeployments) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredSignatures, other.RequiredSignatures) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(PullRequest, other.PullRequest) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(RequiredStatusChecks, other.RequiredStatusChecks) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(NonFastForward, other.NonFastForward) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitMessagePattern, other.CommitMessagePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitAuthorEmailPattern, other.CommitAuthorEmailPattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CommitterEmailPattern, other.CommitterEmailPattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(BranchNamePattern, other.BranchNamePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(TagNamePattern, other.TagNamePattern) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePathRestriction, other.FilePathRestriction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaxFilePathLength, other.MaxFilePathLength) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileExtensionRestriction, other.FileExtensionRestriction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(MaxFileSize, other.MaxFileSize) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Workflows, other.Workflows) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeScanning, other.CodeScanning) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#JsonConverters.RepositoryRule.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#JsonConverters.RepositoryRule.g.verified.cs index ba468971d2..5d7d5f2d0d 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#JsonConverters.RepositoryRule.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/GitHub/SystemTextJson/_#JsonConverters.RepositoryRule.g.verified.cs @@ -22,177 +22,177 @@ public class RepositoryRuleJsonConverter : global::System.Text.Json.Serializatio throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.RepositoryRuleCreation? value1 = default; + global::G.RepositoryRuleCreation? creation = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.Creation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCreation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleCreation)}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + creation = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleUpdate? value2 = default; + global::G.RepositoryRuleUpdate? update = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.Update) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleUpdate), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleUpdate)}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + update = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleDeletion? value3 = default; + global::G.RepositoryRuleDeletion? deletion = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.Deletion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleDeletion), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleDeletion)}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + deletion = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleRequiredLinearHistory? value4 = default; + global::G.RepositoryRuleRequiredLinearHistory? requiredLinearHistory = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.RequiredLinearHistory) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredLinearHistory), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleRequiredLinearHistory)}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + requiredLinearHistory = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleMergeQueue? value5 = default; + global::G.RepositoryRuleMergeQueue? mergeQueue = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.MergeQueue) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleMergeQueue), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleMergeQueue)}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + mergeQueue = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleRequiredDeployments? value6 = default; + global::G.RepositoryRuleRequiredDeployments? requiredDeployments = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.RequiredDeployments) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredDeployments), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleRequiredDeployments)}"); - value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + requiredDeployments = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleRequiredSignatures? value7 = default; + global::G.RepositoryRuleRequiredSignatures? requiredSignatures = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.RequiredSignatures) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredSignatures), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleRequiredSignatures)}"); - value7 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + requiredSignatures = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRulePullRequest? value8 = default; + global::G.RepositoryRulePullRequest? pullRequest = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.PullRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRulePullRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRulePullRequest)}"); - value8 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + pullRequest = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleRequiredStatusChecks? value9 = default; + global::G.RepositoryRuleRequiredStatusChecks? requiredStatusChecks = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.RequiredStatusChecks) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredStatusChecks), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleRequiredStatusChecks)}"); - value9 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + requiredStatusChecks = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleNonFastForward? value10 = default; + global::G.RepositoryRuleNonFastForward? nonFastForward = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.NonFastForward) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleNonFastForward), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleNonFastForward)}"); - value10 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + nonFastForward = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleCommitMessagePattern? value11 = default; + global::G.RepositoryRuleCommitMessagePattern? commitMessagePattern = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.CommitMessagePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitMessagePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleCommitMessagePattern)}"); - value11 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + commitMessagePattern = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleCommitAuthorEmailPattern? value12 = default; + global::G.RepositoryRuleCommitAuthorEmailPattern? commitAuthorEmailPattern = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.CommitAuthorEmailPattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitAuthorEmailPattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleCommitAuthorEmailPattern)}"); - value12 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + commitAuthorEmailPattern = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleCommitterEmailPattern? value13 = default; + global::G.RepositoryRuleCommitterEmailPattern? committerEmailPattern = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.CommitterEmailPattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitterEmailPattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleCommitterEmailPattern)}"); - value13 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + committerEmailPattern = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleBranchNamePattern? value14 = default; + global::G.RepositoryRuleBranchNamePattern? branchNamePattern = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.BranchNamePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleBranchNamePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleBranchNamePattern)}"); - value14 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + branchNamePattern = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleTagNamePattern? value15 = default; + global::G.RepositoryRuleTagNamePattern? tagNamePattern = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.TagNamePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleTagNamePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleTagNamePattern)}"); - value15 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + tagNamePattern = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleVariant16? value16 = default; + global::G.RepositoryRuleVariant16? filePathRestriction = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.FilePathRestriction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleVariant16)}"); - value16 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + filePathRestriction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleVariant17? value17 = default; + global::G.RepositoryRuleVariant17? maxFilePathLength = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.MaxFilePathLength) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleVariant17)}"); - value17 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + maxFilePathLength = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleVariant18? value18 = default; + global::G.RepositoryRuleVariant18? fileExtensionRestriction = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.FileExtensionRestriction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleVariant18)}"); - value18 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileExtensionRestriction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleVariant19? value19 = default; + global::G.RepositoryRuleVariant19? maxFileSize = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.MaxFileSize) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleVariant19)}"); - value19 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + maxFileSize = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleWorkflows? value20 = default; + global::G.RepositoryRuleWorkflows? workflows = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.Workflows) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleWorkflows), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleWorkflows)}"); - value20 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + workflows = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RepositoryRuleCodeScanning? value21 = default; + global::G.RepositoryRuleCodeScanning? codeScanning = default; if (discriminator?.Type == global::G.RepositoryRuleDiscriminatorType.CodeScanning) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCodeScanning), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RepositoryRuleCodeScanning)}"); - value21 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeScanning = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.RepositoryRule( discriminator?.Type, - value1, - value2, - value3, - value4, - value5, - value6, - value7, - value8, - value9, - value10, - value11, - value12, - value13, - value14, - value15, - value16, - value17, - value18, - value19, - value20, - value21 + creation, + update, + deletion, + requiredLinearHistory, + mergeQueue, + requiredDeployments, + requiredSignatures, + pullRequest, + requiredStatusChecks, + nonFastForward, + commitMessagePattern, + commitAuthorEmailPattern, + committerEmailPattern, + branchNamePattern, + tagNamePattern, + filePathRestriction, + maxFilePathLength, + fileExtensionRestriction, + maxFileSize, + workflows, + codeScanning ); return result; @@ -207,131 +207,131 @@ 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.IsCreation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCreation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleCreation).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Creation, typeInfo); } - else if (value.IsValue2) + else if (value.IsUpdate) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleUpdate), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleUpdate).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Update, typeInfo); } - else if (value.IsValue3) + else if (value.IsDeletion) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleDeletion), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleDeletion).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Deletion, typeInfo); } - else if (value.IsValue4) + else if (value.IsRequiredLinearHistory) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredLinearHistory), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleRequiredLinearHistory).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RequiredLinearHistory, typeInfo); } - else if (value.IsValue5) + else if (value.IsMergeQueue) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleMergeQueue), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleMergeQueue).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MergeQueue, typeInfo); } - else if (value.IsValue6) + else if (value.IsRequiredDeployments) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredDeployments), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleRequiredDeployments).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RequiredDeployments, typeInfo); } - else if (value.IsValue7) + else if (value.IsRequiredSignatures) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredSignatures), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleRequiredSignatures).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RequiredSignatures, typeInfo); } - else if (value.IsValue8) + else if (value.IsPullRequest) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRulePullRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRulePullRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.PullRequest, typeInfo); } - else if (value.IsValue9) + else if (value.IsRequiredStatusChecks) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleRequiredStatusChecks), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleRequiredStatusChecks).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.RequiredStatusChecks, typeInfo); } - else if (value.IsValue10) + else if (value.IsNonFastForward) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleNonFastForward), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleNonFastForward).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value10, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.NonFastForward, typeInfo); } - else if (value.IsValue11) + else if (value.IsCommitMessagePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitMessagePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleCommitMessagePattern).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value11, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CommitMessagePattern, typeInfo); } - else if (value.IsValue12) + else if (value.IsCommitAuthorEmailPattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitAuthorEmailPattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleCommitAuthorEmailPattern).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value12, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CommitAuthorEmailPattern, typeInfo); } - else if (value.IsValue13) + else if (value.IsCommitterEmailPattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCommitterEmailPattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleCommitterEmailPattern).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value13, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CommitterEmailPattern, typeInfo); } - else if (value.IsValue14) + else if (value.IsBranchNamePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleBranchNamePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleBranchNamePattern).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value14, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.BranchNamePattern, typeInfo); } - else if (value.IsValue15) + else if (value.IsTagNamePattern) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleTagNamePattern), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleTagNamePattern).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value15, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.TagNamePattern, typeInfo); } - else if (value.IsValue16) + else if (value.IsFilePathRestriction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value16, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePathRestriction, typeInfo); } - else if (value.IsValue17) + else if (value.IsMaxFilePathLength) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value17, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaxFilePathLength, typeInfo); } - else if (value.IsValue18) + else if (value.IsFileExtensionRestriction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleVariant18).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value18, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileExtensionRestriction, typeInfo); } - else if (value.IsValue19) + else if (value.IsMaxFileSize) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleVariant19).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value19, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.MaxFileSize, typeInfo); } - else if (value.IsValue20) + else if (value.IsWorkflows) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleWorkflows), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleWorkflows).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value20, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Workflows, typeInfo); } - else if (value.IsValue21) + else if (value.IsCodeScanning) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RepositoryRuleCodeScanning), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RepositoryRuleCodeScanning).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value21, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeScanning, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Models.EntitiesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Models.EntitiesItem.g.verified.cs index d6a6824da3..1f872e1907 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Models.EntitiesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Models.EntitiesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.TenantShareRunToken? TenantShareRunToken { get; init; } + public global::G.TenantShareRunToken? Run { get; init; } #else - public global::G.TenantShareRunToken? TenantShareRunToken { get; } + public global::G.TenantShareRunToken? Run { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TenantShareRunToken))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Run))] #endif - public bool IsTenantShareRunToken => TenantShareRunToken != null; + public bool IsRun => Run != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.TenantShareRunToken?(EntitiesItem @this) => @this.TenantShareRunToken; + public static implicit operator global::G.TenantShareRunToken?(EntitiesItem @this) => @this.Run; /// /// /// public EntitiesItem(global::G.TenantShareRunToken? value) { - TenantShareRunToken = value; + Run = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.TenantShareDatasetToken? TenantShareDatasetToken { get; init; } + public global::G.TenantShareDatasetToken? Dataset { get; init; } #else - public global::G.TenantShareDatasetToken? TenantShareDatasetToken { get; } + public global::G.TenantShareDatasetToken? Dataset { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TenantShareDatasetToken))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Dataset))] #endif - public bool IsTenantShareDatasetToken => TenantShareDatasetToken != null; + public bool IsDataset => Dataset != null; /// /// @@ -76,14 +76,14 @@ public EntitiesItem(global::G.TenantShareRunToken? value) /// /// /// - public static implicit operator global::G.TenantShareDatasetToken?(EntitiesItem @this) => @this.TenantShareDatasetToken; + public static implicit operator global::G.TenantShareDatasetToken?(EntitiesItem @this) => @this.Dataset; /// /// /// public EntitiesItem(global::G.TenantShareDatasetToken? value) { - TenantShareDatasetToken = value; + Dataset = value; } /// @@ -91,22 +91,22 @@ public EntitiesItem(global::G.TenantShareDatasetToken? value) /// public EntitiesItem( global::G.TenantShareTokensResponseEntitieDiscriminatorType? type, - global::G.TenantShareRunToken? tenantShareRunToken, - global::G.TenantShareDatasetToken? tenantShareDatasetToken + global::G.TenantShareRunToken? run, + global::G.TenantShareDatasetToken? dataset ) { Type = type; - TenantShareRunToken = tenantShareRunToken; - TenantShareDatasetToken = tenantShareDatasetToken; + Run = run; + Dataset = dataset; } /// /// /// public object? Object => - TenantShareDatasetToken as object ?? - TenantShareRunToken as object + Dataset as object ?? + Run as object ; /// @@ -114,15 +114,15 @@ TenantShareRunToken as object /// public bool Validate() { - return IsTenantShareRunToken && !IsTenantShareDatasetToken || !IsTenantShareRunToken && IsTenantShareDatasetToken; + return IsRun && !IsDataset || !IsRun && IsDataset; } /// /// /// public TResult? Match( - global::System.Func? tenantShareRunToken = null, - global::System.Func? tenantShareDatasetToken = null, + global::System.Func? run = null, + global::System.Func? dataset = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsTenantShareRunToken && tenantShareRunToken != null) + if (IsRun && run != null) { - return tenantShareRunToken(TenantShareRunToken!); + return run(Run!); } - else if (IsTenantShareDatasetToken && tenantShareDatasetToken != null) + else if (IsDataset && dataset != null) { - return tenantShareDatasetToken(TenantShareDatasetToken!); + return dataset(Dataset!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? tenantShareRunToken = null, - global::System.Action? tenantShareDatasetToken = null, + global::System.Action? run = null, + global::System.Action? dataset = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsTenantShareRunToken) + if (IsRun) { - tenantShareRunToken?.Invoke(TenantShareRunToken!); + run?.Invoke(Run!); } - else if (IsTenantShareDatasetToken) + else if (IsDataset) { - tenantShareDatasetToken?.Invoke(TenantShareDatasetToken!); + dataset?.Invoke(Dataset!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - TenantShareRunToken, + Run, typeof(global::G.TenantShareRunToken), - TenantShareDatasetToken, + Dataset, typeof(global::G.TenantShareDatasetToken), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EntitiesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(TenantShareRunToken, other.TenantShareRunToken) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TenantShareDatasetToken, other.TenantShareDatasetToken) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Run, other.Run) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Dataset, other.Dataset) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Models.EntitiesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Models.EntitiesItem.g.verified.cs index fc2d3f7ada..7a29d6249c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Models.EntitiesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Models.EntitiesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.TenantShareRunToken? TenantShareRunToken { get; init; } + public global::G.TenantShareRunToken? Run { get; init; } #else - public global::G.TenantShareRunToken? TenantShareRunToken { get; } + public global::G.TenantShareRunToken? Run { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TenantShareRunToken))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Run))] #endif - public bool IsTenantShareRunToken => TenantShareRunToken != null; + public bool IsRun => Run != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.TenantShareRunToken?(EntitiesItem @this) => @this.TenantShareRunToken; + public static implicit operator global::G.TenantShareRunToken?(EntitiesItem @this) => @this.Run; /// /// /// public EntitiesItem(global::G.TenantShareRunToken? value) { - TenantShareRunToken = value; + Run = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.TenantShareDatasetToken? TenantShareDatasetToken { get; init; } + public global::G.TenantShareDatasetToken? Dataset { get; init; } #else - public global::G.TenantShareDatasetToken? TenantShareDatasetToken { get; } + public global::G.TenantShareDatasetToken? Dataset { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TenantShareDatasetToken))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Dataset))] #endif - public bool IsTenantShareDatasetToken => TenantShareDatasetToken != null; + public bool IsDataset => Dataset != null; /// /// @@ -76,14 +76,14 @@ public EntitiesItem(global::G.TenantShareRunToken? value) /// /// /// - public static implicit operator global::G.TenantShareDatasetToken?(EntitiesItem @this) => @this.TenantShareDatasetToken; + public static implicit operator global::G.TenantShareDatasetToken?(EntitiesItem @this) => @this.Dataset; /// /// /// public EntitiesItem(global::G.TenantShareDatasetToken? value) { - TenantShareDatasetToken = value; + Dataset = value; } /// @@ -91,22 +91,22 @@ public EntitiesItem(global::G.TenantShareDatasetToken? value) /// public EntitiesItem( global::G.TenantShareTokensResponseEntitieDiscriminatorType? type, - global::G.TenantShareRunToken? tenantShareRunToken, - global::G.TenantShareDatasetToken? tenantShareDatasetToken + global::G.TenantShareRunToken? run, + global::G.TenantShareDatasetToken? dataset ) { Type = type; - TenantShareRunToken = tenantShareRunToken; - TenantShareDatasetToken = tenantShareDatasetToken; + Run = run; + Dataset = dataset; } /// /// /// public object? Object => - TenantShareDatasetToken as object ?? - TenantShareRunToken as object + Dataset as object ?? + Run as object ; /// @@ -114,15 +114,15 @@ TenantShareRunToken as object /// public bool Validate() { - return IsTenantShareRunToken && !IsTenantShareDatasetToken || !IsTenantShareRunToken && IsTenantShareDatasetToken; + return IsRun && !IsDataset || !IsRun && IsDataset; } /// /// /// public TResult? Match( - global::System.Func? tenantShareRunToken = null, - global::System.Func? tenantShareDatasetToken = null, + global::System.Func? run = null, + global::System.Func? dataset = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsTenantShareRunToken && tenantShareRunToken != null) + if (IsRun && run != null) { - return tenantShareRunToken(TenantShareRunToken!); + return run(Run!); } - else if (IsTenantShareDatasetToken && tenantShareDatasetToken != null) + else if (IsDataset && dataset != null) { - return tenantShareDatasetToken(TenantShareDatasetToken!); + return dataset(Dataset!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? tenantShareRunToken = null, - global::System.Action? tenantShareDatasetToken = null, + global::System.Action? run = null, + global::System.Action? dataset = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsTenantShareRunToken) + if (IsRun) { - tenantShareRunToken?.Invoke(TenantShareRunToken!); + run?.Invoke(Run!); } - else if (IsTenantShareDatasetToken) + else if (IsDataset) { - tenantShareDatasetToken?.Invoke(TenantShareDatasetToken!); + dataset?.Invoke(Dataset!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - TenantShareRunToken, + Run, typeof(global::G.TenantShareRunToken), - TenantShareDatasetToken, + Dataset, typeof(global::G.TenantShareDatasetToken), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(EntitiesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(TenantShareRunToken, other.TenantShareRunToken) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(TenantShareDatasetToken, other.TenantShareDatasetToken) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Run, other.Run) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Dataset, other.Dataset) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#JsonConverters.EntitiesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#JsonConverters.EntitiesItem.g.verified.cs index 6dedd141a8..fe1de8db23 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#JsonConverters.EntitiesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#JsonConverters.EntitiesItem.g.verified.cs @@ -22,25 +22,25 @@ public class EntitiesItemJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TenantShareTokensResponseEntitieDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.TenantShareRunToken? tenantShareRunToken = default; + global::G.TenantShareRunToken? run = default; if (discriminator?.Type == global::G.TenantShareTokensResponseEntitieDiscriminatorType.Run) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TenantShareRunToken), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TenantShareRunToken)}"); - tenantShareRunToken = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + run = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.TenantShareDatasetToken? tenantShareDatasetToken = default; + global::G.TenantShareDatasetToken? dataset = default; if (discriminator?.Type == global::G.TenantShareTokensResponseEntitieDiscriminatorType.Dataset) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TenantShareDatasetToken), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TenantShareDatasetToken)}"); - tenantShareDatasetToken = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + dataset = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.EntitiesItem( discriminator?.Type, - tenantShareRunToken, - tenantShareDatasetToken + run, + dataset ); return result; @@ -55,17 +55,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.IsTenantShareRunToken) + if (value.IsRun) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TenantShareRunToken), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.TenantShareRunToken).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TenantShareRunToken, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Run, typeInfo); } - else if (value.IsTenantShareDatasetToken) + else if (value.IsDataset) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.TenantShareDatasetToken), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.TenantShareDatasetToken).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.TenantShareDatasetToken, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Dataset, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem.g.verified.cs index 9d69fee34b..83b9e5f5de 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; init; } + public global::G.MessageContentTextAnnotationsFileCitationObject? FileCitation { get; init; } #else - public global::G.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; } + public global::G.MessageContentTextAnnotationsFileCitationObject? FileCitation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFileCitationObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitation))] #endif - public bool IsMessageContentTextFileCitationObject => MessageContentTextFileCitationObject != null; + public bool IsFileCitation => FileCitation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentTextAnnotationsFileCitationObject?(AnnotationsItem @this) => @this.MessageContentTextFileCitationObject; + public static implicit operator global::G.MessageContentTextAnnotationsFileCitationObject?(AnnotationsItem @this) => @this.FileCitation; /// /// /// public AnnotationsItem(global::G.MessageContentTextAnnotationsFileCitationObject? value) { - MessageContentTextFileCitationObject = value; + FileCitation = value; } /// /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; init; } + public global::G.MessageContentTextAnnotationsFilePathObject? FilePath { get; init; } #else - public global::G.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; } + public global::G.MessageContentTextAnnotationsFilePathObject? FilePath { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFilePathObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] #endif - public bool IsMessageContentTextFilePathObject => MessageContentTextFilePathObject != null; + public bool IsFilePath => FilePath != null; /// /// @@ -76,14 +76,14 @@ public AnnotationsItem(global::G.MessageContentTextAnnotationsFileCitationObject /// /// /// - public static implicit operator global::G.MessageContentTextAnnotationsFilePathObject?(AnnotationsItem @this) => @this.MessageContentTextFilePathObject; + public static implicit operator global::G.MessageContentTextAnnotationsFilePathObject?(AnnotationsItem @this) => @this.FilePath; /// /// /// public AnnotationsItem(global::G.MessageContentTextAnnotationsFilePathObject? value) { - MessageContentTextFilePathObject = value; + FilePath = value; } /// @@ -91,22 +91,22 @@ public AnnotationsItem(global::G.MessageContentTextAnnotationsFilePathObject? va /// public AnnotationsItem( global::G.MessageContentTextObjectTextAnnotationDiscriminatorType? type, - global::G.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject, - global::G.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject + global::G.MessageContentTextAnnotationsFileCitationObject? fileCitation, + global::G.MessageContentTextAnnotationsFilePathObject? filePath ) { Type = type; - MessageContentTextFileCitationObject = messageContentTextFileCitationObject; - MessageContentTextFilePathObject = messageContentTextFilePathObject; + FileCitation = fileCitation; + FilePath = filePath; } /// /// /// public object? Object => - MessageContentTextFilePathObject as object ?? - MessageContentTextFileCitationObject as object + FilePath as object ?? + FileCitation as object ; /// @@ -114,15 +114,15 @@ MessageContentTextFileCitationObject as object /// public bool Validate() { - return IsMessageContentTextFileCitationObject && !IsMessageContentTextFilePathObject || !IsMessageContentTextFileCitationObject && IsMessageContentTextFilePathObject; + return IsFileCitation && !IsFilePath || !IsFileCitation && IsFilePath; } /// /// /// public TResult? Match( - global::System.Func? messageContentTextFileCitationObject = null, - global::System.Func? messageContentTextFilePathObject = null, + global::System.Func? fileCitation = null, + global::System.Func? filePath = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsMessageContentTextFileCitationObject && messageContentTextFileCitationObject != null) + if (IsFileCitation && fileCitation != null) { - return messageContentTextFileCitationObject(MessageContentTextFileCitationObject!); + return fileCitation(FileCitation!); } - else if (IsMessageContentTextFilePathObject && messageContentTextFilePathObject != null) + else if (IsFilePath && filePath != null) { - return messageContentTextFilePathObject(MessageContentTextFilePathObject!); + return filePath(FilePath!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageContentTextFileCitationObject = null, - global::System.Action? messageContentTextFilePathObject = null, + global::System.Action? fileCitation = null, + global::System.Action? filePath = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsMessageContentTextFileCitationObject) + if (IsFileCitation) { - messageContentTextFileCitationObject?.Invoke(MessageContentTextFileCitationObject!); + fileCitation?.Invoke(FileCitation!); } - else if (IsMessageContentTextFilePathObject) + else if (IsFilePath) { - messageContentTextFilePathObject?.Invoke(MessageContentTextFilePathObject!); + filePath?.Invoke(FilePath!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - MessageContentTextFileCitationObject, + FileCitation, typeof(global::G.MessageContentTextAnnotationsFileCitationObject), - MessageContentTextFilePathObject, + FilePath, typeof(global::G.MessageContentTextAnnotationsFilePathObject), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AnnotationsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFileCitationObject, other.MessageContentTextFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFilePathObject, other.MessageContentTextFilePathObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitation, other.FileCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePath, other.FilePath) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem2.g.verified.cs index f3290f0d0f..0188c38a41 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AnnotationsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; init; } + public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? FileCitation { get; init; } #else - public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; } + public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? FileCitation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFileCitationObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitation))] #endif - public bool IsMessageDeltaContentTextFileCitationObject => MessageDeltaContentTextFileCitationObject != null; + public bool IsFileCitation => FileCitation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageDeltaContentTextAnnotationsFileCitationObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFileCitationObject; + public static implicit operator global::G.MessageDeltaContentTextAnnotationsFileCitationObject?(AnnotationsItem2 @this) => @this.FileCitation; /// /// /// public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFileCitationObject? value) { - MessageDeltaContentTextFileCitationObject = value; + FileCitation = value; } /// /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; init; } + public global::G.MessageDeltaContentTextAnnotationsFilePathObject? FilePath { get; init; } #else - public global::G.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; } + public global::G.MessageDeltaContentTextAnnotationsFilePathObject? FilePath { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFilePathObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] #endif - public bool IsMessageDeltaContentTextFilePathObject => MessageDeltaContentTextFilePathObject != null; + public bool IsFilePath => FilePath != null; /// /// @@ -76,14 +76,14 @@ public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFileCitation /// /// /// - public static implicit operator global::G.MessageDeltaContentTextAnnotationsFilePathObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFilePathObject; + public static implicit operator global::G.MessageDeltaContentTextAnnotationsFilePathObject?(AnnotationsItem2 @this) => @this.FilePath; /// /// /// public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFilePathObject? value) { - MessageDeltaContentTextFilePathObject = value; + FilePath = value; } /// @@ -91,22 +91,22 @@ public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFilePathObje /// public AnnotationsItem2( global::G.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? type, - global::G.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject, - global::G.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject + global::G.MessageDeltaContentTextAnnotationsFileCitationObject? fileCitation, + global::G.MessageDeltaContentTextAnnotationsFilePathObject? filePath ) { Type = type; - MessageDeltaContentTextFileCitationObject = messageDeltaContentTextFileCitationObject; - MessageDeltaContentTextFilePathObject = messageDeltaContentTextFilePathObject; + FileCitation = fileCitation; + FilePath = filePath; } /// /// /// public object? Object => - MessageDeltaContentTextFilePathObject as object ?? - MessageDeltaContentTextFileCitationObject as object + FilePath as object ?? + FileCitation as object ; /// @@ -114,15 +114,15 @@ MessageDeltaContentTextFileCitationObject as object /// public bool Validate() { - return IsMessageDeltaContentTextFileCitationObject && !IsMessageDeltaContentTextFilePathObject || !IsMessageDeltaContentTextFileCitationObject && IsMessageDeltaContentTextFilePathObject; + return IsFileCitation && !IsFilePath || !IsFileCitation && IsFilePath; } /// /// /// public TResult? Match( - global::System.Func? messageDeltaContentTextFileCitationObject = null, - global::System.Func? messageDeltaContentTextFilePathObject = null, + global::System.Func? fileCitation = null, + global::System.Func? filePath = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsMessageDeltaContentTextFileCitationObject && messageDeltaContentTextFileCitationObject != null) + if (IsFileCitation && fileCitation != null) { - return messageDeltaContentTextFileCitationObject(MessageDeltaContentTextFileCitationObject!); + return fileCitation(FileCitation!); } - else if (IsMessageDeltaContentTextFilePathObject && messageDeltaContentTextFilePathObject != null) + else if (IsFilePath && filePath != null) { - return messageDeltaContentTextFilePathObject(MessageDeltaContentTextFilePathObject!); + return filePath(FilePath!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageDeltaContentTextFileCitationObject = null, - global::System.Action? messageDeltaContentTextFilePathObject = null, + global::System.Action? fileCitation = null, + global::System.Action? filePath = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsMessageDeltaContentTextFileCitationObject) + if (IsFileCitation) { - messageDeltaContentTextFileCitationObject?.Invoke(MessageDeltaContentTextFileCitationObject!); + fileCitation?.Invoke(FileCitation!); } - else if (IsMessageDeltaContentTextFilePathObject) + else if (IsFilePath) { - messageDeltaContentTextFilePathObject?.Invoke(MessageDeltaContentTextFilePathObject!); + filePath?.Invoke(FilePath!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - MessageDeltaContentTextFileCitationObject, + FileCitation, typeof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject), - MessageDeltaContentTextFilePathObject, + FilePath, typeof(global::G.MessageDeltaContentTextAnnotationsFilePathObject), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AnnotationsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFileCitationObject, other.MessageDeltaContentTextFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFilePathObject, other.MessageDeltaContentTextFilePathObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitation, other.FileCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePath, other.FilePath) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AssistantStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AssistantStreamEvent.g.verified.cs index cdbc39a86c..023904ead3 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AssistantStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.AssistantStreamEvent.g.verified.cs @@ -34,18 +34,18 @@ namespace G /// Occurs when an [error](/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. /// #if NET6_0_OR_GREATER - public global::G.ErrorEvent? Value1 { get; init; } + public global::G.ErrorEvent? Error { get; init; } #else - public global::G.ErrorEvent? Value1 { get; } + public global::G.ErrorEvent? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsValue1 => Value1 != null; + public bool IsError => Error != null; /// /// @@ -55,32 +55,32 @@ namespace G /// /// /// - public static implicit operator global::G.ErrorEvent?(AssistantStreamEvent @this) => @this.Value1; + public static implicit operator global::G.ErrorEvent?(AssistantStreamEvent @this) => @this.Error; /// /// /// public AssistantStreamEvent(global::G.ErrorEvent? value) { - Value1 = value; + Error = value; } /// /// Occurs when a stream ends. /// #if NET6_0_OR_GREATER - public global::G.DoneEvent? Value2 { get; init; } + public global::G.DoneEvent? Done { get; init; } #else - public global::G.DoneEvent? Value2 { get; } + public global::G.DoneEvent? Done { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Done))] #endif - public bool IsValue2 => Value2 != null; + public bool IsDone => Done != null; /// /// @@ -90,32 +90,32 @@ public AssistantStreamEvent(global::G.ErrorEvent? value) /// /// /// - public static implicit operator global::G.DoneEvent?(AssistantStreamEvent @this) => @this.Value2; + public static implicit operator global::G.DoneEvent?(AssistantStreamEvent @this) => @this.Done; /// /// /// public AssistantStreamEvent(global::G.DoneEvent? value) { - Value2 = value; + Done = value; } /// /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant3? Value3 { get; init; } + public global::G.AssistantStreamEventVariant3? ThreadCreated { get; init; } #else - public global::G.AssistantStreamEventVariant3? Value3 { get; } + public global::G.AssistantStreamEventVariant3? ThreadCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadCreated))] #endif - public bool IsValue3 => Value3 != null; + public bool IsThreadCreated => ThreadCreated != null; /// /// @@ -125,32 +125,32 @@ public AssistantStreamEvent(global::G.DoneEvent? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant3?(AssistantStreamEvent @this) => @this.Value3; + public static implicit operator global::G.AssistantStreamEventVariant3?(AssistantStreamEvent @this) => @this.ThreadCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant3? value) { - Value3 = value; + ThreadCreated = value; } /// /// Occurs when a new [run](/docs/api-reference/runs/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant4? Value4 { get; init; } + public global::G.AssistantStreamEventVariant4? ThreadRunCreated { get; init; } #else - public global::G.AssistantStreamEventVariant4? Value4 { get; } + public global::G.AssistantStreamEventVariant4? ThreadRunCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCreated))] #endif - public bool IsValue4 => Value4 != null; + public bool IsThreadRunCreated => ThreadRunCreated != null; /// /// @@ -160,32 +160,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant3? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant4?(AssistantStreamEvent @this) => @this.Value4; + public static implicit operator global::G.AssistantStreamEventVariant4?(AssistantStreamEvent @this) => @this.ThreadRunCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant4? value) { - Value4 = value; + ThreadRunCreated = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant5? Value5 { get; init; } + public global::G.AssistantStreamEventVariant5? ThreadRunQueued { get; init; } #else - public global::G.AssistantStreamEventVariant5? Value5 { get; } + public global::G.AssistantStreamEventVariant5? ThreadRunQueued { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunQueued))] #endif - public bool IsValue5 => Value5 != null; + public bool IsThreadRunQueued => ThreadRunQueued != null; /// /// @@ -195,32 +195,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant4? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant5?(AssistantStreamEvent @this) => @this.Value5; + public static implicit operator global::G.AssistantStreamEventVariant5?(AssistantStreamEvent @this) => @this.ThreadRunQueued; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant5? value) { - Value5 = value; + ThreadRunQueued = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant6? Value6 { get; init; } + public global::G.AssistantStreamEventVariant6? ThreadRunInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant6? Value6 { get; } + public global::G.AssistantStreamEventVariant6? ThreadRunInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunInProgress))] #endif - public bool IsValue6 => Value6 != null; + public bool IsThreadRunInProgress => ThreadRunInProgress != null; /// /// @@ -230,32 +230,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant5? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant6?(AssistantStreamEvent @this) => @this.Value6; + public static implicit operator global::G.AssistantStreamEventVariant6?(AssistantStreamEvent @this) => @this.ThreadRunInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant6? value) { - Value6 = value; + ThreadRunInProgress = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant7? Value7 { get; init; } + public global::G.AssistantStreamEventVariant7? ThreadRunRequiresAction { get; init; } #else - public global::G.AssistantStreamEventVariant7? Value7 { get; } + public global::G.AssistantStreamEventVariant7? ThreadRunRequiresAction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunRequiresAction))] #endif - public bool IsValue7 => Value7 != null; + public bool IsThreadRunRequiresAction => ThreadRunRequiresAction != null; /// /// @@ -265,32 +265,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant6? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant7?(AssistantStreamEvent @this) => @this.Value7; + public static implicit operator global::G.AssistantStreamEventVariant7?(AssistantStreamEvent @this) => @this.ThreadRunRequiresAction; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant7? value) { - Value7 = value; + ThreadRunRequiresAction = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant8? Value8 { get; init; } + public global::G.AssistantStreamEventVariant8? ThreadRunCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant8? Value8 { get; } + public global::G.AssistantStreamEventVariant8? ThreadRunCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCompleted))] #endif - public bool IsValue8 => Value8 != null; + public bool IsThreadRunCompleted => ThreadRunCompleted != null; /// /// @@ -300,32 +300,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant7? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant8?(AssistantStreamEvent @this) => @this.Value8; + public static implicit operator global::G.AssistantStreamEventVariant8?(AssistantStreamEvent @this) => @this.ThreadRunCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant8? value) { - Value8 = value; + ThreadRunCompleted = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant9? Value9 { get; init; } + public global::G.AssistantStreamEventVariant9? ThreadRunIncomplete { get; init; } #else - public global::G.AssistantStreamEventVariant9? Value9 { get; } + public global::G.AssistantStreamEventVariant9? ThreadRunIncomplete { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunIncomplete))] #endif - public bool IsValue9 => Value9 != null; + public bool IsThreadRunIncomplete => ThreadRunIncomplete != null; /// /// @@ -335,32 +335,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant8? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant9?(AssistantStreamEvent @this) => @this.Value9; + public static implicit operator global::G.AssistantStreamEventVariant9?(AssistantStreamEvent @this) => @this.ThreadRunIncomplete; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant9? value) { - Value9 = value; + ThreadRunIncomplete = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) fails. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant10? Value10 { get; init; } + public global::G.AssistantStreamEventVariant10? ThreadRunFailed { get; init; } #else - public global::G.AssistantStreamEventVariant10? Value10 { get; } + public global::G.AssistantStreamEventVariant10? ThreadRunFailed { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunFailed))] #endif - public bool IsValue10 => Value10 != null; + public bool IsThreadRunFailed => ThreadRunFailed != null; /// /// @@ -370,32 +370,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant9? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant10?(AssistantStreamEvent @this) => @this.Value10; + public static implicit operator global::G.AssistantStreamEventVariant10?(AssistantStreamEvent @this) => @this.ThreadRunFailed; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant10? value) { - Value10 = value; + ThreadRunFailed = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant11? Value11 { get; init; } + public global::G.AssistantStreamEventVariant11? ThreadRunCancelling { get; init; } #else - public global::G.AssistantStreamEventVariant11? Value11 { get; } + public global::G.AssistantStreamEventVariant11? ThreadRunCancelling { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value11))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCancelling))] #endif - public bool IsValue11 => Value11 != null; + public bool IsThreadRunCancelling => ThreadRunCancelling != null; /// /// @@ -405,32 +405,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant10? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant11?(AssistantStreamEvent @this) => @this.Value11; + public static implicit operator global::G.AssistantStreamEventVariant11?(AssistantStreamEvent @this) => @this.ThreadRunCancelling; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant11? value) { - Value11 = value; + ThreadRunCancelling = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant12? Value12 { get; init; } + public global::G.AssistantStreamEventVariant12? ThreadRunCancelled { get; init; } #else - public global::G.AssistantStreamEventVariant12? Value12 { get; } + public global::G.AssistantStreamEventVariant12? ThreadRunCancelled { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value12))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCancelled))] #endif - public bool IsValue12 => Value12 != null; + public bool IsThreadRunCancelled => ThreadRunCancelled != null; /// /// @@ -440,32 +440,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant11? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant12?(AssistantStreamEvent @this) => @this.Value12; + public static implicit operator global::G.AssistantStreamEventVariant12?(AssistantStreamEvent @this) => @this.ThreadRunCancelled; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant12? value) { - Value12 = value; + ThreadRunCancelled = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) expires. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant13? Value13 { get; init; } + public global::G.AssistantStreamEventVariant13? ThreadRunExpired { get; init; } #else - public global::G.AssistantStreamEventVariant13? Value13 { get; } + public global::G.AssistantStreamEventVariant13? ThreadRunExpired { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value13))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunExpired))] #endif - public bool IsValue13 => Value13 != null; + public bool IsThreadRunExpired => ThreadRunExpired != null; /// /// @@ -475,32 +475,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant12? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant13?(AssistantStreamEvent @this) => @this.Value13; + public static implicit operator global::G.AssistantStreamEventVariant13?(AssistantStreamEvent @this) => @this.ThreadRunExpired; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant13? value) { - Value13 = value; + ThreadRunExpired = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant14? Value14 { get; init; } + public global::G.AssistantStreamEventVariant14? ThreadRunStepCreated { get; init; } #else - public global::G.AssistantStreamEventVariant14? Value14 { get; } + public global::G.AssistantStreamEventVariant14? ThreadRunStepCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value14))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCreated))] #endif - public bool IsValue14 => Value14 != null; + public bool IsThreadRunStepCreated => ThreadRunStepCreated != null; /// /// @@ -510,32 +510,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant13? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant14?(AssistantStreamEvent @this) => @this.Value14; + public static implicit operator global::G.AssistantStreamEventVariant14?(AssistantStreamEvent @this) => @this.ThreadRunStepCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant14? value) { - Value14 = value; + ThreadRunStepCreated = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant15? Value15 { get; init; } + public global::G.AssistantStreamEventVariant15? ThreadRunStepInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant15? Value15 { get; } + public global::G.AssistantStreamEventVariant15? ThreadRunStepInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value15))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepInProgress))] #endif - public bool IsValue15 => Value15 != null; + public bool IsThreadRunStepInProgress => ThreadRunStepInProgress != null; /// /// @@ -545,32 +545,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant14? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant15?(AssistantStreamEvent @this) => @this.Value15; + public static implicit operator global::G.AssistantStreamEventVariant15?(AssistantStreamEvent @this) => @this.ThreadRunStepInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant15? value) { - Value15 = value; + ThreadRunStepInProgress = value; } /// /// Occurs when parts of a [run step](/docs/api-reference/runs/step-object) are being streamed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant16? Value16 { get; init; } + public global::G.AssistantStreamEventVariant16? ThreadRunStepDelta { get; init; } #else - public global::G.AssistantStreamEventVariant16? Value16 { get; } + public global::G.AssistantStreamEventVariant16? ThreadRunStepDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value16))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepDelta))] #endif - public bool IsValue16 => Value16 != null; + public bool IsThreadRunStepDelta => ThreadRunStepDelta != null; /// /// @@ -580,32 +580,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant15? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant16?(AssistantStreamEvent @this) => @this.Value16; + public static implicit operator global::G.AssistantStreamEventVariant16?(AssistantStreamEvent @this) => @this.ThreadRunStepDelta; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant16? value) { - Value16 = value; + ThreadRunStepDelta = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant17? Value17 { get; init; } + public global::G.AssistantStreamEventVariant17? ThreadRunStepCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant17? Value17 { get; } + public global::G.AssistantStreamEventVariant17? ThreadRunStepCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value17))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCompleted))] #endif - public bool IsValue17 => Value17 != null; + public bool IsThreadRunStepCompleted => ThreadRunStepCompleted != null; /// /// @@ -615,32 +615,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant16? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant17?(AssistantStreamEvent @this) => @this.Value17; + public static implicit operator global::G.AssistantStreamEventVariant17?(AssistantStreamEvent @this) => @this.ThreadRunStepCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant17? value) { - Value17 = value; + ThreadRunStepCompleted = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) fails. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant18? Value18 { get; init; } + public global::G.AssistantStreamEventVariant18? ThreadRunStepFailed { get; init; } #else - public global::G.AssistantStreamEventVariant18? Value18 { get; } + public global::G.AssistantStreamEventVariant18? ThreadRunStepFailed { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value18))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepFailed))] #endif - public bool IsValue18 => Value18 != null; + public bool IsThreadRunStepFailed => ThreadRunStepFailed != null; /// /// @@ -650,32 +650,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant17? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant18?(AssistantStreamEvent @this) => @this.Value18; + public static implicit operator global::G.AssistantStreamEventVariant18?(AssistantStreamEvent @this) => @this.ThreadRunStepFailed; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant18? value) { - Value18 = value; + ThreadRunStepFailed = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is cancelled. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant19? Value19 { get; init; } + public global::G.AssistantStreamEventVariant19? ThreadRunStepCancelled { get; init; } #else - public global::G.AssistantStreamEventVariant19? Value19 { get; } + public global::G.AssistantStreamEventVariant19? ThreadRunStepCancelled { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value19))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCancelled))] #endif - public bool IsValue19 => Value19 != null; + public bool IsThreadRunStepCancelled => ThreadRunStepCancelled != null; /// /// @@ -685,32 +685,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant18? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant19?(AssistantStreamEvent @this) => @this.Value19; + public static implicit operator global::G.AssistantStreamEventVariant19?(AssistantStreamEvent @this) => @this.ThreadRunStepCancelled; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant19? value) { - Value19 = value; + ThreadRunStepCancelled = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) expires. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant20? Value20 { get; init; } + public global::G.AssistantStreamEventVariant20? ThreadRunStepExpired { get; init; } #else - public global::G.AssistantStreamEventVariant20? Value20 { get; } + public global::G.AssistantStreamEventVariant20? ThreadRunStepExpired { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value20))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepExpired))] #endif - public bool IsValue20 => Value20 != null; + public bool IsThreadRunStepExpired => ThreadRunStepExpired != null; /// /// @@ -720,32 +720,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant19? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant20?(AssistantStreamEvent @this) => @this.Value20; + public static implicit operator global::G.AssistantStreamEventVariant20?(AssistantStreamEvent @this) => @this.ThreadRunStepExpired; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant20? value) { - Value20 = value; + ThreadRunStepExpired = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant21? Value21 { get; init; } + public global::G.AssistantStreamEventVariant21? ThreadMessageCreated { get; init; } #else - public global::G.AssistantStreamEventVariant21? Value21 { get; } + public global::G.AssistantStreamEventVariant21? ThreadMessageCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageCreated))] #endif - public bool IsValue21 => Value21 != null; + public bool IsThreadMessageCreated => ThreadMessageCreated != null; /// /// @@ -755,32 +755,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant20? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant21?(AssistantStreamEvent @this) => @this.Value21; + public static implicit operator global::G.AssistantStreamEventVariant21?(AssistantStreamEvent @this) => @this.ThreadMessageCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant21? value) { - Value21 = value; + ThreadMessageCreated = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant22? Value22 { get; init; } + public global::G.AssistantStreamEventVariant22? ThreadMessageInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant22? Value22 { get; } + public global::G.AssistantStreamEventVariant22? ThreadMessageInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value22))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageInProgress))] #endif - public bool IsValue22 => Value22 != null; + public bool IsThreadMessageInProgress => ThreadMessageInProgress != null; /// /// @@ -790,32 +790,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant21? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant22?(AssistantStreamEvent @this) => @this.Value22; + public static implicit operator global::G.AssistantStreamEventVariant22?(AssistantStreamEvent @this) => @this.ThreadMessageInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant22? value) { - Value22 = value; + ThreadMessageInProgress = value; } /// /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant23? Value23 { get; init; } + public global::G.AssistantStreamEventVariant23? ThreadMessageDelta { get; init; } #else - public global::G.AssistantStreamEventVariant23? Value23 { get; } + public global::G.AssistantStreamEventVariant23? ThreadMessageDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value23))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageDelta))] #endif - public bool IsValue23 => Value23 != null; + public bool IsThreadMessageDelta => ThreadMessageDelta != null; /// /// @@ -825,32 +825,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant22? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant23?(AssistantStreamEvent @this) => @this.Value23; + public static implicit operator global::G.AssistantStreamEventVariant23?(AssistantStreamEvent @this) => @this.ThreadMessageDelta; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant23? value) { - Value23 = value; + ThreadMessageDelta = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant24? Value24 { get; init; } + public global::G.AssistantStreamEventVariant24? ThreadMessageCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant24? Value24 { get; } + public global::G.AssistantStreamEventVariant24? ThreadMessageCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value24))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageCompleted))] #endif - public bool IsValue24 => Value24 != null; + public bool IsThreadMessageCompleted => ThreadMessageCompleted != null; /// /// @@ -860,32 +860,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant23? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant24?(AssistantStreamEvent @this) => @this.Value24; + public static implicit operator global::G.AssistantStreamEventVariant24?(AssistantStreamEvent @this) => @this.ThreadMessageCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant24? value) { - Value24 = value; + ThreadMessageCompleted = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant25? Value25 { get; init; } + public global::G.AssistantStreamEventVariant25? ThreadMessageIncomplete { get; init; } #else - public global::G.AssistantStreamEventVariant25? Value25 { get; } + public global::G.AssistantStreamEventVariant25? ThreadMessageIncomplete { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value25))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageIncomplete))] #endif - public bool IsValue25 => Value25 != null; + public bool IsThreadMessageIncomplete => ThreadMessageIncomplete != null; /// /// @@ -895,14 +895,14 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant24? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant25?(AssistantStreamEvent @this) => @this.Value25; + public static implicit operator global::G.AssistantStreamEventVariant25?(AssistantStreamEvent @this) => @this.ThreadMessageIncomplete; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant25? value) { - Value25 = value; + ThreadMessageIncomplete = value; } /// @@ -910,91 +910,91 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant25? value) /// public AssistantStreamEvent( global::G.AssistantStreamEventDiscriminatorEvent? @event, - global::G.ErrorEvent? value1, - global::G.DoneEvent? value2, - global::G.AssistantStreamEventVariant3? value3, - global::G.AssistantStreamEventVariant4? value4, - global::G.AssistantStreamEventVariant5? value5, - global::G.AssistantStreamEventVariant6? value6, - global::G.AssistantStreamEventVariant7? value7, - global::G.AssistantStreamEventVariant8? value8, - global::G.AssistantStreamEventVariant9? value9, - global::G.AssistantStreamEventVariant10? value10, - global::G.AssistantStreamEventVariant11? value11, - global::G.AssistantStreamEventVariant12? value12, - global::G.AssistantStreamEventVariant13? value13, - global::G.AssistantStreamEventVariant14? value14, - global::G.AssistantStreamEventVariant15? value15, - global::G.AssistantStreamEventVariant16? value16, - global::G.AssistantStreamEventVariant17? value17, - global::G.AssistantStreamEventVariant18? value18, - global::G.AssistantStreamEventVariant19? value19, - global::G.AssistantStreamEventVariant20? value20, - global::G.AssistantStreamEventVariant21? value21, - global::G.AssistantStreamEventVariant22? value22, - global::G.AssistantStreamEventVariant23? value23, - global::G.AssistantStreamEventVariant24? value24, - global::G.AssistantStreamEventVariant25? value25 + global::G.ErrorEvent? error, + global::G.DoneEvent? done, + global::G.AssistantStreamEventVariant3? threadCreated, + global::G.AssistantStreamEventVariant4? threadRunCreated, + global::G.AssistantStreamEventVariant5? threadRunQueued, + global::G.AssistantStreamEventVariant6? threadRunInProgress, + global::G.AssistantStreamEventVariant7? threadRunRequiresAction, + global::G.AssistantStreamEventVariant8? threadRunCompleted, + global::G.AssistantStreamEventVariant9? threadRunIncomplete, + global::G.AssistantStreamEventVariant10? threadRunFailed, + global::G.AssistantStreamEventVariant11? threadRunCancelling, + global::G.AssistantStreamEventVariant12? threadRunCancelled, + global::G.AssistantStreamEventVariant13? threadRunExpired, + global::G.AssistantStreamEventVariant14? threadRunStepCreated, + global::G.AssistantStreamEventVariant15? threadRunStepInProgress, + global::G.AssistantStreamEventVariant16? threadRunStepDelta, + global::G.AssistantStreamEventVariant17? threadRunStepCompleted, + global::G.AssistantStreamEventVariant18? threadRunStepFailed, + global::G.AssistantStreamEventVariant19? threadRunStepCancelled, + global::G.AssistantStreamEventVariant20? threadRunStepExpired, + global::G.AssistantStreamEventVariant21? threadMessageCreated, + global::G.AssistantStreamEventVariant22? threadMessageInProgress, + global::G.AssistantStreamEventVariant23? threadMessageDelta, + global::G.AssistantStreamEventVariant24? threadMessageCompleted, + global::G.AssistantStreamEventVariant25? threadMessageIncomplete ) { Event = @event; - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - Value8 = value8; - Value9 = value9; - Value10 = value10; - Value11 = value11; - Value12 = value12; - Value13 = value13; - Value14 = value14; - Value15 = value15; - Value16 = value16; - Value17 = value17; - Value18 = value18; - Value19 = value19; - Value20 = value20; - Value21 = value21; - Value22 = value22; - Value23 = value23; - Value24 = value24; - Value25 = value25; + Error = error; + Done = done; + ThreadCreated = threadCreated; + ThreadRunCreated = threadRunCreated; + ThreadRunQueued = threadRunQueued; + ThreadRunInProgress = threadRunInProgress; + ThreadRunRequiresAction = threadRunRequiresAction; + ThreadRunCompleted = threadRunCompleted; + ThreadRunIncomplete = threadRunIncomplete; + ThreadRunFailed = threadRunFailed; + ThreadRunCancelling = threadRunCancelling; + ThreadRunCancelled = threadRunCancelled; + ThreadRunExpired = threadRunExpired; + ThreadRunStepCreated = threadRunStepCreated; + ThreadRunStepInProgress = threadRunStepInProgress; + ThreadRunStepDelta = threadRunStepDelta; + ThreadRunStepCompleted = threadRunStepCompleted; + ThreadRunStepFailed = threadRunStepFailed; + ThreadRunStepCancelled = threadRunStepCancelled; + ThreadRunStepExpired = threadRunStepExpired; + ThreadMessageCreated = threadMessageCreated; + ThreadMessageInProgress = threadMessageInProgress; + ThreadMessageDelta = threadMessageDelta; + ThreadMessageCompleted = threadMessageCompleted; + ThreadMessageIncomplete = threadMessageIncomplete; } /// /// /// public object? Object => - Value25 as object ?? - Value24 as object ?? - Value23 as object ?? - Value22 as object ?? - Value21 as object ?? - Value20 as object ?? - Value19 as object ?? - Value18 as object ?? - Value17 as object ?? - Value16 as object ?? - Value15 as object ?? - Value14 as object ?? - Value13 as object ?? - Value12 as object ?? - Value11 as object ?? - Value10 as object ?? - Value9 as object ?? - Value8 as object ?? - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object + ThreadMessageIncomplete as object ?? + ThreadMessageCompleted as object ?? + ThreadMessageDelta as object ?? + ThreadMessageInProgress as object ?? + ThreadMessageCreated as object ?? + ThreadRunStepExpired as object ?? + ThreadRunStepCancelled as object ?? + ThreadRunStepFailed as object ?? + ThreadRunStepCompleted as object ?? + ThreadRunStepDelta as object ?? + ThreadRunStepInProgress as object ?? + ThreadRunStepCreated as object ?? + ThreadRunExpired as object ?? + ThreadRunCancelled as object ?? + ThreadRunCancelling as object ?? + ThreadRunFailed as object ?? + ThreadRunIncomplete as object ?? + ThreadRunCompleted as object ?? + ThreadRunRequiresAction as object ?? + ThreadRunInProgress as object ?? + ThreadRunQueued as object ?? + ThreadRunCreated as object ?? + ThreadCreated as object ?? + Done as object ?? + Error as object ; /// @@ -1002,38 +1002,38 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && IsValue25; + return IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && IsThreadMessageIncomplete; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - global::System.Func? value8 = null, - global::System.Func? value9 = null, - global::System.Func? value10 = null, - global::System.Func? value11 = null, - global::System.Func? value12 = null, - global::System.Func? value13 = null, - global::System.Func? value14 = null, - global::System.Func? value15 = null, - global::System.Func? value16 = null, - global::System.Func? value17 = null, - global::System.Func? value18 = null, - global::System.Func? value19 = null, - global::System.Func? value20 = null, - global::System.Func? value21 = null, - global::System.Func? value22 = null, - global::System.Func? value23 = null, - global::System.Func? value24 = null, - global::System.Func? value25 = null, + global::System.Func? error = null, + global::System.Func? done = null, + global::System.Func? threadCreated = null, + global::System.Func? threadRunCreated = null, + global::System.Func? threadRunQueued = null, + global::System.Func? threadRunInProgress = null, + global::System.Func? threadRunRequiresAction = null, + global::System.Func? threadRunCompleted = null, + global::System.Func? threadRunIncomplete = null, + global::System.Func? threadRunFailed = null, + global::System.Func? threadRunCancelling = null, + global::System.Func? threadRunCancelled = null, + global::System.Func? threadRunExpired = null, + global::System.Func? threadRunStepCreated = null, + global::System.Func? threadRunStepInProgress = null, + global::System.Func? threadRunStepDelta = null, + global::System.Func? threadRunStepCompleted = null, + global::System.Func? threadRunStepFailed = null, + global::System.Func? threadRunStepCancelled = null, + global::System.Func? threadRunStepExpired = null, + global::System.Func? threadMessageCreated = null, + global::System.Func? threadMessageInProgress = null, + global::System.Func? threadMessageDelta = null, + global::System.Func? threadMessageCompleted = null, + global::System.Func? threadMessageIncomplete = null, bool validate = true) { if (validate) @@ -1041,105 +1041,105 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsError && error != null) { - return value1(Value1!); + return error(Error!); } - else if (IsValue2 && value2 != null) + else if (IsDone && done != null) { - return value2(Value2!); + return done(Done!); } - else if (IsValue3 && value3 != null) + else if (IsThreadCreated && threadCreated != null) { - return value3(Value3!); + return threadCreated(ThreadCreated!); } - else if (IsValue4 && value4 != null) + else if (IsThreadRunCreated && threadRunCreated != null) { - return value4(Value4!); + return threadRunCreated(ThreadRunCreated!); } - else if (IsValue5 && value5 != null) + else if (IsThreadRunQueued && threadRunQueued != null) { - return value5(Value5!); + return threadRunQueued(ThreadRunQueued!); } - else if (IsValue6 && value6 != null) + else if (IsThreadRunInProgress && threadRunInProgress != null) { - return value6(Value6!); + return threadRunInProgress(ThreadRunInProgress!); } - else if (IsValue7 && value7 != null) + else if (IsThreadRunRequiresAction && threadRunRequiresAction != null) { - return value7(Value7!); + return threadRunRequiresAction(ThreadRunRequiresAction!); } - else if (IsValue8 && value8 != null) + else if (IsThreadRunCompleted && threadRunCompleted != null) { - return value8(Value8!); + return threadRunCompleted(ThreadRunCompleted!); } - else if (IsValue9 && value9 != null) + else if (IsThreadRunIncomplete && threadRunIncomplete != null) { - return value9(Value9!); + return threadRunIncomplete(ThreadRunIncomplete!); } - else if (IsValue10 && value10 != null) + else if (IsThreadRunFailed && threadRunFailed != null) { - return value10(Value10!); + return threadRunFailed(ThreadRunFailed!); } - else if (IsValue11 && value11 != null) + else if (IsThreadRunCancelling && threadRunCancelling != null) { - return value11(Value11!); + return threadRunCancelling(ThreadRunCancelling!); } - else if (IsValue12 && value12 != null) + else if (IsThreadRunCancelled && threadRunCancelled != null) { - return value12(Value12!); + return threadRunCancelled(ThreadRunCancelled!); } - else if (IsValue13 && value13 != null) + else if (IsThreadRunExpired && threadRunExpired != null) { - return value13(Value13!); + return threadRunExpired(ThreadRunExpired!); } - else if (IsValue14 && value14 != null) + else if (IsThreadRunStepCreated && threadRunStepCreated != null) { - return value14(Value14!); + return threadRunStepCreated(ThreadRunStepCreated!); } - else if (IsValue15 && value15 != null) + else if (IsThreadRunStepInProgress && threadRunStepInProgress != null) { - return value15(Value15!); + return threadRunStepInProgress(ThreadRunStepInProgress!); } - else if (IsValue16 && value16 != null) + else if (IsThreadRunStepDelta && threadRunStepDelta != null) { - return value16(Value16!); + return threadRunStepDelta(ThreadRunStepDelta!); } - else if (IsValue17 && value17 != null) + else if (IsThreadRunStepCompleted && threadRunStepCompleted != null) { - return value17(Value17!); + return threadRunStepCompleted(ThreadRunStepCompleted!); } - else if (IsValue18 && value18 != null) + else if (IsThreadRunStepFailed && threadRunStepFailed != null) { - return value18(Value18!); + return threadRunStepFailed(ThreadRunStepFailed!); } - else if (IsValue19 && value19 != null) + else if (IsThreadRunStepCancelled && threadRunStepCancelled != null) { - return value19(Value19!); + return threadRunStepCancelled(ThreadRunStepCancelled!); } - else if (IsValue20 && value20 != null) + else if (IsThreadRunStepExpired && threadRunStepExpired != null) { - return value20(Value20!); + return threadRunStepExpired(ThreadRunStepExpired!); } - else if (IsValue21 && value21 != null) + else if (IsThreadMessageCreated && threadMessageCreated != null) { - return value21(Value21!); + return threadMessageCreated(ThreadMessageCreated!); } - else if (IsValue22 && value22 != null) + else if (IsThreadMessageInProgress && threadMessageInProgress != null) { - return value22(Value22!); + return threadMessageInProgress(ThreadMessageInProgress!); } - else if (IsValue23 && value23 != null) + else if (IsThreadMessageDelta && threadMessageDelta != null) { - return value23(Value23!); + return threadMessageDelta(ThreadMessageDelta!); } - else if (IsValue24 && value24 != null) + else if (IsThreadMessageCompleted && threadMessageCompleted != null) { - return value24(Value24!); + return threadMessageCompleted(ThreadMessageCompleted!); } - else if (IsValue25 && value25 != null) + else if (IsThreadMessageIncomplete && threadMessageIncomplete != null) { - return value25(Value25!); + return threadMessageIncomplete(ThreadMessageIncomplete!); } return default(TResult); @@ -1149,31 +1149,31 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - global::System.Action? value8 = null, - global::System.Action? value9 = null, - global::System.Action? value10 = null, - global::System.Action? value11 = null, - global::System.Action? value12 = null, - global::System.Action? value13 = null, - global::System.Action? value14 = null, - global::System.Action? value15 = null, - global::System.Action? value16 = null, - global::System.Action? value17 = null, - global::System.Action? value18 = null, - global::System.Action? value19 = null, - global::System.Action? value20 = null, - global::System.Action? value21 = null, - global::System.Action? value22 = null, - global::System.Action? value23 = null, - global::System.Action? value24 = null, - global::System.Action? value25 = null, + global::System.Action? error = null, + global::System.Action? done = null, + global::System.Action? threadCreated = null, + global::System.Action? threadRunCreated = null, + global::System.Action? threadRunQueued = null, + global::System.Action? threadRunInProgress = null, + global::System.Action? threadRunRequiresAction = null, + global::System.Action? threadRunCompleted = null, + global::System.Action? threadRunIncomplete = null, + global::System.Action? threadRunFailed = null, + global::System.Action? threadRunCancelling = null, + global::System.Action? threadRunCancelled = null, + global::System.Action? threadRunExpired = null, + global::System.Action? threadRunStepCreated = null, + global::System.Action? threadRunStepInProgress = null, + global::System.Action? threadRunStepDelta = null, + global::System.Action? threadRunStepCompleted = null, + global::System.Action? threadRunStepFailed = null, + global::System.Action? threadRunStepCancelled = null, + global::System.Action? threadRunStepExpired = null, + global::System.Action? threadMessageCreated = null, + global::System.Action? threadMessageInProgress = null, + global::System.Action? threadMessageDelta = null, + global::System.Action? threadMessageCompleted = null, + global::System.Action? threadMessageIncomplete = null, bool validate = true) { if (validate) @@ -1181,105 +1181,105 @@ public void Match( Validate(); } - if (IsValue1) + if (IsError) { - value1?.Invoke(Value1!); + error?.Invoke(Error!); } - else if (IsValue2) + else if (IsDone) { - value2?.Invoke(Value2!); + done?.Invoke(Done!); } - else if (IsValue3) + else if (IsThreadCreated) { - value3?.Invoke(Value3!); + threadCreated?.Invoke(ThreadCreated!); } - else if (IsValue4) + else if (IsThreadRunCreated) { - value4?.Invoke(Value4!); + threadRunCreated?.Invoke(ThreadRunCreated!); } - else if (IsValue5) + else if (IsThreadRunQueued) { - value5?.Invoke(Value5!); + threadRunQueued?.Invoke(ThreadRunQueued!); } - else if (IsValue6) + else if (IsThreadRunInProgress) { - value6?.Invoke(Value6!); + threadRunInProgress?.Invoke(ThreadRunInProgress!); } - else if (IsValue7) + else if (IsThreadRunRequiresAction) { - value7?.Invoke(Value7!); + threadRunRequiresAction?.Invoke(ThreadRunRequiresAction!); } - else if (IsValue8) + else if (IsThreadRunCompleted) { - value8?.Invoke(Value8!); + threadRunCompleted?.Invoke(ThreadRunCompleted!); } - else if (IsValue9) + else if (IsThreadRunIncomplete) { - value9?.Invoke(Value9!); + threadRunIncomplete?.Invoke(ThreadRunIncomplete!); } - else if (IsValue10) + else if (IsThreadRunFailed) { - value10?.Invoke(Value10!); + threadRunFailed?.Invoke(ThreadRunFailed!); } - else if (IsValue11) + else if (IsThreadRunCancelling) { - value11?.Invoke(Value11!); + threadRunCancelling?.Invoke(ThreadRunCancelling!); } - else if (IsValue12) + else if (IsThreadRunCancelled) { - value12?.Invoke(Value12!); + threadRunCancelled?.Invoke(ThreadRunCancelled!); } - else if (IsValue13) + else if (IsThreadRunExpired) { - value13?.Invoke(Value13!); + threadRunExpired?.Invoke(ThreadRunExpired!); } - else if (IsValue14) + else if (IsThreadRunStepCreated) { - value14?.Invoke(Value14!); + threadRunStepCreated?.Invoke(ThreadRunStepCreated!); } - else if (IsValue15) + else if (IsThreadRunStepInProgress) { - value15?.Invoke(Value15!); + threadRunStepInProgress?.Invoke(ThreadRunStepInProgress!); } - else if (IsValue16) + else if (IsThreadRunStepDelta) { - value16?.Invoke(Value16!); + threadRunStepDelta?.Invoke(ThreadRunStepDelta!); } - else if (IsValue17) + else if (IsThreadRunStepCompleted) { - value17?.Invoke(Value17!); + threadRunStepCompleted?.Invoke(ThreadRunStepCompleted!); } - else if (IsValue18) + else if (IsThreadRunStepFailed) { - value18?.Invoke(Value18!); + threadRunStepFailed?.Invoke(ThreadRunStepFailed!); } - else if (IsValue19) + else if (IsThreadRunStepCancelled) { - value19?.Invoke(Value19!); + threadRunStepCancelled?.Invoke(ThreadRunStepCancelled!); } - else if (IsValue20) + else if (IsThreadRunStepExpired) { - value20?.Invoke(Value20!); + threadRunStepExpired?.Invoke(ThreadRunStepExpired!); } - else if (IsValue21) + else if (IsThreadMessageCreated) { - value21?.Invoke(Value21!); + threadMessageCreated?.Invoke(ThreadMessageCreated!); } - else if (IsValue22) + else if (IsThreadMessageInProgress) { - value22?.Invoke(Value22!); + threadMessageInProgress?.Invoke(ThreadMessageInProgress!); } - else if (IsValue23) + else if (IsThreadMessageDelta) { - value23?.Invoke(Value23!); + threadMessageDelta?.Invoke(ThreadMessageDelta!); } - else if (IsValue24) + else if (IsThreadMessageCompleted) { - value24?.Invoke(Value24!); + threadMessageCompleted?.Invoke(ThreadMessageCompleted!); } - else if (IsValue25) + else if (IsThreadMessageIncomplete) { - value25?.Invoke(Value25!); + threadMessageIncomplete?.Invoke(ThreadMessageIncomplete!); } } @@ -1290,55 +1290,55 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Error, typeof(global::G.ErrorEvent), - Value2, + Done, typeof(global::G.DoneEvent), - Value3, + ThreadCreated, typeof(global::G.AssistantStreamEventVariant3), - Value4, + ThreadRunCreated, typeof(global::G.AssistantStreamEventVariant4), - Value5, + ThreadRunQueued, typeof(global::G.AssistantStreamEventVariant5), - Value6, + ThreadRunInProgress, typeof(global::G.AssistantStreamEventVariant6), - Value7, + ThreadRunRequiresAction, typeof(global::G.AssistantStreamEventVariant7), - Value8, + ThreadRunCompleted, typeof(global::G.AssistantStreamEventVariant8), - Value9, + ThreadRunIncomplete, typeof(global::G.AssistantStreamEventVariant9), - Value10, + ThreadRunFailed, typeof(global::G.AssistantStreamEventVariant10), - Value11, + ThreadRunCancelling, typeof(global::G.AssistantStreamEventVariant11), - Value12, + ThreadRunCancelled, typeof(global::G.AssistantStreamEventVariant12), - Value13, + ThreadRunExpired, typeof(global::G.AssistantStreamEventVariant13), - Value14, + ThreadRunStepCreated, typeof(global::G.AssistantStreamEventVariant14), - Value15, + ThreadRunStepInProgress, typeof(global::G.AssistantStreamEventVariant15), - Value16, + ThreadRunStepDelta, typeof(global::G.AssistantStreamEventVariant16), - Value17, + ThreadRunStepCompleted, typeof(global::G.AssistantStreamEventVariant17), - Value18, + ThreadRunStepFailed, typeof(global::G.AssistantStreamEventVariant18), - Value19, + ThreadRunStepCancelled, typeof(global::G.AssistantStreamEventVariant19), - Value20, + ThreadRunStepExpired, typeof(global::G.AssistantStreamEventVariant20), - Value21, + ThreadMessageCreated, typeof(global::G.AssistantStreamEventVariant21), - Value22, + ThreadMessageInProgress, typeof(global::G.AssistantStreamEventVariant22), - Value23, + ThreadMessageDelta, typeof(global::G.AssistantStreamEventVariant23), - Value24, + ThreadMessageCompleted, typeof(global::G.AssistantStreamEventVariant24), - Value25, + ThreadMessageIncomplete, typeof(global::G.AssistantStreamEventVariant25), }; const int offset = unchecked((int)2166136261); @@ -1355,31 +1355,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AssistantStreamEvent 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(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value11, other.Value11) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value12, other.Value12) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value13, other.Value13) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value14, other.Value14) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value15, other.Value15) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value16, other.Value16) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value17, other.Value17) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value18, other.Value18) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value19, other.Value19) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value20, other.Value20) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value21, other.Value21) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value22, other.Value22) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value23, other.Value23) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value24, other.Value24) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value25, other.Value25) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Done, other.Done) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadCreated, other.ThreadCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCreated, other.ThreadRunCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunQueued, other.ThreadRunQueued) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunInProgress, other.ThreadRunInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunRequiresAction, other.ThreadRunRequiresAction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCompleted, other.ThreadRunCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunIncomplete, other.ThreadRunIncomplete) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunFailed, other.ThreadRunFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCancelling, other.ThreadRunCancelling) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCancelled, other.ThreadRunCancelled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunExpired, other.ThreadRunExpired) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCreated, other.ThreadRunStepCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepInProgress, other.ThreadRunStepInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepDelta, other.ThreadRunStepDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCompleted, other.ThreadRunStepCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepFailed, other.ThreadRunStepFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCancelled, other.ThreadRunStepCancelled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepExpired, other.ThreadRunStepExpired) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageCreated, other.ThreadMessageCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageInProgress, other.ThreadMessageInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageDelta, other.ThreadMessageDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageCompleted, other.ThreadMessageCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageIncomplete, other.ThreadMessageIncomplete) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs index aa034ef078..1fb49d2cba 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs @@ -55,18 +55,18 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque /// /// #if NET6_0_OR_GREATER - public global::G.ChatCompletionRequestMessageContentPartImage? Image { get; init; } + public global::G.ChatCompletionRequestMessageContentPartImage? ImageUrl { get; init; } #else - public global::G.ChatCompletionRequestMessageContentPartImage? Image { get; } + public global::G.ChatCompletionRequestMessageContentPartImage? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsImage => Image != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,14 +76,14 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque /// /// /// - public static implicit operator global::G.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.Image; + public static implicit operator global::G.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.ImageUrl; /// /// /// public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionRequestMessageContentPartImage? value) { - Image = value; + ImageUrl = value; } /// @@ -92,20 +92,20 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque public ChatCompletionRequestUserMessageContentPart( global::G.ChatCompletionRequestUserMessageContentPartDiscriminatorType? type, global::G.ChatCompletionRequestMessageContentPartText? text, - global::G.ChatCompletionRequestMessageContentPartImage? image + global::G.ChatCompletionRequestMessageContentPartImage? imageUrl ) { Type = type; Text = text; - Image = image; + ImageUrl = imageUrl; } /// /// /// public object? Object => - Image as object ?? + ImageUrl as object ?? Text as object ; @@ -114,7 +114,7 @@ Text as object /// public bool Validate() { - return IsText && !IsImage || !IsText && IsImage; + return IsText && !IsImageUrl || !IsText && IsImageUrl; } /// @@ -122,7 +122,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? image = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -134,9 +134,9 @@ public bool Validate() { return text(Text!); } - else if (IsImage && image != null) + else if (IsImageUrl && imageUrl != null) { - return image(Image!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -147,7 +147,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? image = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -159,9 +159,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsImage) + else if (IsImageUrl) { - image?.Invoke(Image!); + imageUrl?.Invoke(ImageUrl!); } } @@ -174,7 +174,7 @@ public override int GetHashCode() { Text, typeof(global::G.ChatCompletionRequestMessageContentPartText), - Image, + ImageUrl, typeof(global::G.ChatCompletionRequestMessageContentPartImage), }; const int offset = unchecked((int)2166136261); @@ -192,7 +192,7 @@ public bool Equals(ChatCompletionRequestUserMessageContentPart other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem.g.verified.cs index 37994312c0..b9e95786fe 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; init; } + public global::G.MessageContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; } + public global::G.MessageContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageImageFileObject => MessageImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentImageFileObject?(ContentItem @this) => @this.MessageImageFileObject; + public static implicit operator global::G.MessageContentImageFileObject?(ContentItem @this) => @this.ImageFile; /// /// /// public ContentItem(global::G.MessageContentImageFileObject? value) { - MessageImageFileObject = value; + ImageFile = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,32 +76,32 @@ public ContentItem(global::G.MessageContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageContentImageUrlObject?(ContentItem @this) => @this.MessageImageUrlObject; + public static implicit operator global::G.MessageContentImageUrlObject?(ContentItem @this) => @this.ImageUrl; /// /// /// public ContentItem(global::G.MessageContentImageUrlObject? value) { - MessageImageUrlObject = value; + ImageUrl = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextObject? MessageTextObject { get; init; } + public global::G.MessageContentTextObject? Text { get; init; } #else - public global::G.MessageContentTextObject? MessageTextObject { get; } + public global::G.MessageContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageTextObject => MessageTextObject != null; + public bool IsText => Text != null; /// /// @@ -111,32 +111,32 @@ public ContentItem(global::G.MessageContentImageUrlObject? value) /// /// /// - public static implicit operator global::G.MessageContentTextObject?(ContentItem @this) => @this.MessageTextObject; + public static implicit operator global::G.MessageContentTextObject?(ContentItem @this) => @this.Text; /// /// /// public ContentItem(global::G.MessageContentTextObject? value) { - MessageTextObject = value; + Text = value; } /// /// The refusal content generated by the assistant. /// #if NET6_0_OR_GREATER - public global::G.MessageContentRefusalObject? MessageRefusalObject { get; init; } + public global::G.MessageContentRefusalObject? Refusal { get; init; } #else - public global::G.MessageContentRefusalObject? MessageRefusalObject { get; } + public global::G.MessageContentRefusalObject? Refusal { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRefusalObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] #endif - public bool IsMessageRefusalObject => MessageRefusalObject != null; + public bool IsRefusal => Refusal != null; /// /// @@ -146,14 +146,14 @@ public ContentItem(global::G.MessageContentTextObject? value) /// /// /// - public static implicit operator global::G.MessageContentRefusalObject?(ContentItem @this) => @this.MessageRefusalObject; + public static implicit operator global::G.MessageContentRefusalObject?(ContentItem @this) => @this.Refusal; /// /// /// public ContentItem(global::G.MessageContentRefusalObject? value) { - MessageRefusalObject = value; + Refusal = value; } /// @@ -161,28 +161,28 @@ public ContentItem(global::G.MessageContentRefusalObject? value) /// public ContentItem( global::G.MessageObjectContentItemDiscriminatorType? type, - global::G.MessageContentImageFileObject? messageImageFileObject, - global::G.MessageContentImageUrlObject? messageImageUrlObject, - global::G.MessageContentTextObject? messageTextObject, - global::G.MessageContentRefusalObject? messageRefusalObject + global::G.MessageContentImageFileObject? imageFile, + global::G.MessageContentImageUrlObject? imageUrl, + global::G.MessageContentTextObject? text, + global::G.MessageContentRefusalObject? refusal ) { Type = type; - MessageImageFileObject = messageImageFileObject; - MessageImageUrlObject = messageImageUrlObject; - MessageTextObject = messageTextObject; - MessageRefusalObject = messageRefusalObject; + ImageFile = imageFile; + ImageUrl = imageUrl; + Text = text; + Refusal = refusal; } /// /// /// public object? Object => - MessageRefusalObject as object ?? - MessageTextObject as object ?? - MessageImageUrlObject as object ?? - MessageImageFileObject as object + Refusal as object ?? + Text as object ?? + ImageUrl as object ?? + ImageFile as object ; /// @@ -190,17 +190,17 @@ MessageImageFileObject as object /// public bool Validate() { - return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && IsMessageRefusalObject; + return IsImageFile && !IsImageUrl && !IsText && !IsRefusal || !IsImageFile && IsImageUrl && !IsText && !IsRefusal || !IsImageFile && !IsImageUrl && IsText && !IsRefusal || !IsImageFile && !IsImageUrl && !IsText && IsRefusal; } /// /// /// public TResult? Match( - global::System.Func? messageImageFileObject = null, - global::System.Func? messageImageUrlObject = null, - global::System.Func? messageTextObject = null, - global::System.Func? messageRefusalObject = null, + global::System.Func? imageFile = null, + global::System.Func? imageUrl = null, + global::System.Func? text = null, + global::System.Func? refusal = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsMessageImageFileObject && messageImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageImageFileObject(MessageImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageImageUrlObject && messageImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageImageUrlObject(MessageImageUrlObject!); + return imageUrl(ImageUrl!); } - else if (IsMessageTextObject && messageTextObject != null) + else if (IsText && text != null) { - return messageTextObject(MessageTextObject!); + return text(Text!); } - else if (IsMessageRefusalObject && messageRefusalObject != null) + else if (IsRefusal && refusal != null) { - return messageRefusalObject(MessageRefusalObject!); + return refusal(Refusal!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageImageFileObject = null, - global::System.Action? messageImageUrlObject = null, - global::System.Action? messageTextObject = null, - global::System.Action? messageRefusalObject = null, + global::System.Action? imageFile = null, + global::System.Action? imageUrl = null, + global::System.Action? text = null, + global::System.Action? refusal = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsMessageImageFileObject) + if (IsImageFile) { - messageImageFileObject?.Invoke(MessageImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageImageUrlObject) + else if (IsImageUrl) { - messageImageUrlObject?.Invoke(MessageImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } - else if (IsMessageTextObject) + else if (IsText) { - messageTextObject?.Invoke(MessageTextObject!); + text?.Invoke(Text!); } - else if (IsMessageRefusalObject) + else if (IsRefusal) { - messageRefusalObject?.Invoke(MessageRefusalObject!); + refusal?.Invoke(Refusal!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - MessageImageFileObject, + ImageFile, typeof(global::G.MessageContentImageFileObject), - MessageImageUrlObject, + ImageUrl, typeof(global::G.MessageContentImageUrlObject), - MessageTextObject, + Text, typeof(global::G.MessageContentTextObject), - MessageRefusalObject, + Refusal, typeof(global::G.MessageContentRefusalObject), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageTextObject, other.MessageTextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRefusalObject, other.MessageRefusalObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem2.g.verified.cs index cc74ed610e..58433a670f 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; init; } + public global::G.MessageDeltaContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; } + public global::G.MessageDeltaContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageDeltaImageFileObject => MessageDeltaImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageDeltaContentImageFileObject?(ContentItem2 @this) => @this.MessageDeltaImageFileObject; + public static implicit operator global::G.MessageDeltaContentImageFileObject?(ContentItem2 @this) => @this.ImageFile; /// /// /// public ContentItem2(global::G.MessageDeltaContentImageFileObject? value) { - MessageDeltaImageFileObject = value; + ImageFile = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextObject? MessageDeltaTextObject { get; init; } + public global::G.MessageDeltaContentTextObject? Text { get; init; } #else - public global::G.MessageDeltaContentTextObject? MessageDeltaTextObject { get; } + public global::G.MessageDeltaContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageDeltaTextObject => MessageDeltaTextObject != null; + public bool IsText => Text != null; /// /// @@ -76,32 +76,32 @@ public ContentItem2(global::G.MessageDeltaContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentTextObject?(ContentItem2 @this) => @this.MessageDeltaTextObject; + public static implicit operator global::G.MessageDeltaContentTextObject?(ContentItem2 @this) => @this.Text; /// /// /// public ContentItem2(global::G.MessageDeltaContentTextObject? value) { - MessageDeltaTextObject = value; + Text = value; } /// /// The refusal content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; init; } + public global::G.MessageDeltaContentRefusalObject? Refusal { get; init; } #else - public global::G.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; } + public global::G.MessageDeltaContentRefusalObject? Refusal { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaRefusalObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] #endif - public bool IsMessageDeltaRefusalObject => MessageDeltaRefusalObject != null; + public bool IsRefusal => Refusal != null; /// /// @@ -111,32 +111,32 @@ public ContentItem2(global::G.MessageDeltaContentTextObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentRefusalObject?(ContentItem2 @this) => @this.MessageDeltaRefusalObject; + public static implicit operator global::G.MessageDeltaContentRefusalObject?(ContentItem2 @this) => @this.Refusal; /// /// /// public ContentItem2(global::G.MessageDeltaContentRefusalObject? value) { - MessageDeltaRefusalObject = value; + Refusal = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; init; } + public global::G.MessageDeltaContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; } + public global::G.MessageDeltaContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageDeltaImageUrlObject => MessageDeltaImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -146,14 +146,14 @@ public ContentItem2(global::G.MessageDeltaContentRefusalObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentImageUrlObject?(ContentItem2 @this) => @this.MessageDeltaImageUrlObject; + public static implicit operator global::G.MessageDeltaContentImageUrlObject?(ContentItem2 @this) => @this.ImageUrl; /// /// /// public ContentItem2(global::G.MessageDeltaContentImageUrlObject? value) { - MessageDeltaImageUrlObject = value; + ImageUrl = value; } /// @@ -161,28 +161,28 @@ public ContentItem2(global::G.MessageDeltaContentImageUrlObject? value) /// public ContentItem2( global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType? type, - global::G.MessageDeltaContentImageFileObject? messageDeltaImageFileObject, - global::G.MessageDeltaContentTextObject? messageDeltaTextObject, - global::G.MessageDeltaContentRefusalObject? messageDeltaRefusalObject, - global::G.MessageDeltaContentImageUrlObject? messageDeltaImageUrlObject + global::G.MessageDeltaContentImageFileObject? imageFile, + global::G.MessageDeltaContentTextObject? text, + global::G.MessageDeltaContentRefusalObject? refusal, + global::G.MessageDeltaContentImageUrlObject? imageUrl ) { Type = type; - MessageDeltaImageFileObject = messageDeltaImageFileObject; - MessageDeltaTextObject = messageDeltaTextObject; - MessageDeltaRefusalObject = messageDeltaRefusalObject; - MessageDeltaImageUrlObject = messageDeltaImageUrlObject; + ImageFile = imageFile; + Text = text; + Refusal = refusal; + ImageUrl = imageUrl; } /// /// /// public object? Object => - MessageDeltaImageUrlObject as object ?? - MessageDeltaRefusalObject as object ?? - MessageDeltaTextObject as object ?? - MessageDeltaImageFileObject as object + ImageUrl as object ?? + Refusal as object ?? + Text as object ?? + ImageFile as object ; /// @@ -190,17 +190,17 @@ MessageDeltaImageFileObject as object /// public bool Validate() { - return IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && IsMessageDeltaImageUrlObject; + return IsImageFile && !IsText && !IsRefusal && !IsImageUrl || !IsImageFile && IsText && !IsRefusal && !IsImageUrl || !IsImageFile && !IsText && IsRefusal && !IsImageUrl || !IsImageFile && !IsText && !IsRefusal && IsImageUrl; } /// /// /// public TResult? Match( - global::System.Func? messageDeltaImageFileObject = null, - global::System.Func? messageDeltaTextObject = null, - global::System.Func? messageDeltaRefusalObject = null, - global::System.Func? messageDeltaImageUrlObject = null, + global::System.Func? imageFile = null, + global::System.Func? text = null, + global::System.Func? refusal = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsMessageDeltaImageFileObject && messageDeltaImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageDeltaImageFileObject(MessageDeltaImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageDeltaTextObject && messageDeltaTextObject != null) + else if (IsText && text != null) { - return messageDeltaTextObject(MessageDeltaTextObject!); + return text(Text!); } - else if (IsMessageDeltaRefusalObject && messageDeltaRefusalObject != null) + else if (IsRefusal && refusal != null) { - return messageDeltaRefusalObject(MessageDeltaRefusalObject!); + return refusal(Refusal!); } - else if (IsMessageDeltaImageUrlObject && messageDeltaImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageDeltaImageUrlObject(MessageDeltaImageUrlObject!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageDeltaImageFileObject = null, - global::System.Action? messageDeltaTextObject = null, - global::System.Action? messageDeltaRefusalObject = null, - global::System.Action? messageDeltaImageUrlObject = null, + global::System.Action? imageFile = null, + global::System.Action? text = null, + global::System.Action? refusal = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsMessageDeltaImageFileObject) + if (IsImageFile) { - messageDeltaImageFileObject?.Invoke(MessageDeltaImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageDeltaTextObject) + else if (IsText) { - messageDeltaTextObject?.Invoke(MessageDeltaTextObject!); + text?.Invoke(Text!); } - else if (IsMessageDeltaRefusalObject) + else if (IsRefusal) { - messageDeltaRefusalObject?.Invoke(MessageDeltaRefusalObject!); + refusal?.Invoke(Refusal!); } - else if (IsMessageDeltaImageUrlObject) + else if (IsImageUrl) { - messageDeltaImageUrlObject?.Invoke(MessageDeltaImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - MessageDeltaImageFileObject, + ImageFile, typeof(global::G.MessageDeltaContentImageFileObject), - MessageDeltaTextObject, + Text, typeof(global::G.MessageDeltaContentTextObject), - MessageDeltaRefusalObject, + Refusal, typeof(global::G.MessageDeltaContentRefusalObject), - MessageDeltaImageUrlObject, + ImageUrl, typeof(global::G.MessageDeltaContentImageUrlObject), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageFileObject, other.MessageDeltaImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaTextObject, other.MessageDeltaTextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaRefusalObject, other.MessageDeltaRefusalObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageUrlObject, other.MessageDeltaImageUrlObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentVariant2Item.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentVariant2Item.g.verified.cs index b3981ec3c1..a2caf33a8e 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentVariant2Item.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ContentVariant2Item.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; init; } + public global::G.MessageContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; } + public global::G.MessageContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageImageFileObject => MessageImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.MessageImageFileObject; + public static implicit operator global::G.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.ImageFile; /// /// /// public ContentVariant2Item(global::G.MessageContentImageFileObject? value) { - MessageImageFileObject = value; + ImageFile = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,32 +76,32 @@ public ContentVariant2Item(global::G.MessageContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.MessageImageUrlObject; + public static implicit operator global::G.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.ImageUrl; /// /// /// public ContentVariant2Item(global::G.MessageContentImageUrlObject? value) { - MessageImageUrlObject = value; + ImageUrl = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageRequestContentTextObject? MessageRequestTextObject { get; init; } + public global::G.MessageRequestContentTextObject? Text { get; init; } #else - public global::G.MessageRequestContentTextObject? MessageRequestTextObject { get; } + public global::G.MessageRequestContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRequestTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageRequestTextObject => MessageRequestTextObject != null; + public bool IsText => Text != null; /// /// @@ -111,14 +111,14 @@ public ContentVariant2Item(global::G.MessageContentImageUrlObject? value) /// /// /// - public static implicit operator global::G.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.MessageRequestTextObject; + public static implicit operator global::G.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.Text; /// /// /// public ContentVariant2Item(global::G.MessageRequestContentTextObject? value) { - MessageRequestTextObject = value; + Text = value; } /// @@ -126,25 +126,25 @@ public ContentVariant2Item(global::G.MessageRequestContentTextObject? value) /// public ContentVariant2Item( global::G.CreateMessageRequestContentVariant2ItemDiscriminatorType? type, - global::G.MessageContentImageFileObject? messageImageFileObject, - global::G.MessageContentImageUrlObject? messageImageUrlObject, - global::G.MessageRequestContentTextObject? messageRequestTextObject + global::G.MessageContentImageFileObject? imageFile, + global::G.MessageContentImageUrlObject? imageUrl, + global::G.MessageRequestContentTextObject? text ) { Type = type; - MessageImageFileObject = messageImageFileObject; - MessageImageUrlObject = messageImageUrlObject; - MessageRequestTextObject = messageRequestTextObject; + ImageFile = imageFile; + ImageUrl = imageUrl; + Text = text; } /// /// /// public object? Object => - MessageRequestTextObject as object ?? - MessageImageUrlObject as object ?? - MessageImageFileObject as object + Text as object ?? + ImageUrl as object ?? + ImageFile as object ; /// @@ -152,16 +152,16 @@ MessageImageFileObject as object /// public bool Validate() { - return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageRequestTextObject; + return IsImageFile && !IsImageUrl && !IsText || !IsImageFile && IsImageUrl && !IsText || !IsImageFile && !IsImageUrl && IsText; } /// /// /// public TResult? Match( - global::System.Func? messageImageFileObject = null, - global::System.Func? messageImageUrlObject = null, - global::System.Func? messageRequestTextObject = null, + global::System.Func? imageFile = null, + global::System.Func? imageUrl = null, + global::System.Func? text = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsMessageImageFileObject && messageImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageImageFileObject(MessageImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageImageUrlObject && messageImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageImageUrlObject(MessageImageUrlObject!); + return imageUrl(ImageUrl!); } - else if (IsMessageRequestTextObject && messageRequestTextObject != null) + else if (IsText && text != null) { - return messageRequestTextObject(MessageRequestTextObject!); + return text(Text!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageImageFileObject = null, - global::System.Action? messageImageUrlObject = null, - global::System.Action? messageRequestTextObject = null, + global::System.Action? imageFile = null, + global::System.Action? imageUrl = null, + global::System.Action? text = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsMessageImageFileObject) + if (IsImageFile) { - messageImageFileObject?.Invoke(MessageImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageImageUrlObject) + else if (IsImageUrl) { - messageImageUrlObject?.Invoke(MessageImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } - else if (IsMessageRequestTextObject) + else if (IsText) { - messageRequestTextObject?.Invoke(MessageRequestTextObject!); + text?.Invoke(Text!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - MessageImageFileObject, + ImageFile, typeof(global::G.MessageContentImageFileObject), - MessageImageUrlObject, + ImageUrl, typeof(global::G.MessageContentImageUrlObject), - MessageRequestTextObject, + Text, typeof(global::G.MessageRequestContentTextObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentVariant2Item other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRequestTextObject, other.MessageRequestTextObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index 5365ebff91..35daff7e61 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; init; } #else - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsValue1 => Value1 != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Auto; /// /// /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) { - Value1 = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; init; } #else - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsValue2 => Value2 != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( /// /// /// - public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Static; /// /// /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) { - Value2 = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto, + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static ) { Type = type; - Value1 = value1; - Value2 = value2; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsAuto && auto != null) { - return value1(Value1!); + return auto(Auto!); } - else if (IsValue2 && value2 != null) + else if (IsStatic && @static != null) { - return value2(Value2!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsAuto) { - value1?.Invoke(Value1!); + auto?.Invoke(Auto!); } - else if (IsValue2) + else if (IsStatic) { - value2?.Invoke(Value2!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Auto, typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, + Static, typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy 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(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index e5fbe08ce3..26953191ee 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; init; } #else - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsValue1 => Value1 != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Auto; /// /// /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) { - Value1 = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; init; } #else - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsValue2 => Value2 != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(glo /// /// /// - public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Static; /// /// /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) { - Value2 = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(glo /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto, + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static ) { Type = type; - Value1 = value1; - Value2 = value2; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsAuto && auto != null) { - return value1(Value1!); + return auto(Auto!); } - else if (IsValue2 && value2 != null) + else if (IsStatic && @static != null) { - return value2(Value2!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsAuto) { - value1?.Invoke(Value1!); + auto?.Invoke(Auto!); } - else if (IsValue2) + else if (IsStatic) { - value2?.Invoke(Value2!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Auto, typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, + Static, typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy 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(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs index 70bb7d232c..30e228d9a7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.AutoChunkingStrategyRequestParam? AutoParam { get; init; } + public global::G.AutoChunkingStrategyRequestParam? Auto { get; init; } #else - public global::G.AutoChunkingStrategyRequestParam? AutoParam { get; } + public global::G.AutoChunkingStrategyRequestParam? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AutoParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsAutoParam => AutoParam != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AutoChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.AutoParam; + public static implicit operator global::G.AutoChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.Auto; /// /// /// public CreateVectorStoreRequestChunkingStrategy(global::G.AutoChunkingStrategyRequestParam? value) { - AutoParam = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.StaticChunkingStrategyRequestParam? StaticParam { get; init; } + public global::G.StaticChunkingStrategyRequestParam? Static { get; init; } #else - public global::G.StaticChunkingStrategyRequestParam? StaticParam { get; } + public global::G.StaticChunkingStrategyRequestParam? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsStaticParam => StaticParam != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateVectorStoreRequestChunkingStrategy(global::G.AutoChunkingStrategyRe /// /// /// - public static implicit operator global::G.StaticChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.StaticParam; + public static implicit operator global::G.StaticChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.Static; /// /// /// public CreateVectorStoreRequestChunkingStrategy(global::G.StaticChunkingStrategyRequestParam? value) { - StaticParam = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateVectorStoreRequestChunkingStrategy(global::G.StaticChunkingStrategy /// public CreateVectorStoreRequestChunkingStrategy( global::G.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? type, - global::G.AutoChunkingStrategyRequestParam? autoParam, - global::G.StaticChunkingStrategyRequestParam? staticParam + global::G.AutoChunkingStrategyRequestParam? auto, + global::G.StaticChunkingStrategyRequestParam? @static ) { Type = type; - AutoParam = autoParam; - StaticParam = staticParam; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - StaticParam as object ?? - AutoParam as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ AutoParam as object /// public bool Validate() { - return IsAutoParam && !IsStaticParam || !IsAutoParam && IsStaticParam; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? autoParam = null, - global::System.Func? staticParam = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAutoParam && autoParam != null) + if (IsAuto && auto != null) { - return autoParam(AutoParam!); + return auto(Auto!); } - else if (IsStaticParam && staticParam != null) + else if (IsStatic && @static != null) { - return staticParam(StaticParam!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? autoParam = null, - global::System.Action? staticParam = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAutoParam) + if (IsAuto) { - autoParam?.Invoke(AutoParam!); + auto?.Invoke(Auto!); } - else if (IsStaticParam) + else if (IsStatic) { - staticParam?.Invoke(StaticParam!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AutoParam, + Auto, typeof(global::G.AutoChunkingStrategyRequestParam), - StaticParam, + Static, typeof(global::G.StaticChunkingStrategyRequestParam), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateVectorStoreRequestChunkingStrategy other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AutoParam, other.AutoParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticParam, other.StaticParam) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem.g.verified.cs index c1abb8df8e..32cde3ae2b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Details of the Code Interpreter tool call the run step was involved in. /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; init; } + public global::G.RunStepDetailsToolCallsCodeObject? CodeInterpreter { get; init; } #else - public global::G.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; } + public global::G.RunStepDetailsToolCallsCodeObject? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsCodeObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsRunStepDetailsCodeObject => RunStepDetailsCodeObject != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsCodeObject?(ToolCallsItem @this) => @this.RunStepDetailsCodeObject; + public static implicit operator global::G.RunStepDetailsToolCallsCodeObject?(ToolCallsItem @this) => @this.CodeInterpreter; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsCodeObject? value) { - RunStepDetailsCodeObject = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; init; } + public global::G.RunStepDetailsToolCallsFileSearchObject? FileSearch { get; init; } #else - public global::G.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; } + public global::G.RunStepDetailsToolCallsFileSearchObject? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFileSearchObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsRunStepDetailsFileSearchObject => RunStepDetailsFileSearchObject != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsCodeObject? value) /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsFileSearchObject?(ToolCallsItem @this) => @this.RunStepDetailsFileSearchObject; + public static implicit operator global::G.RunStepDetailsToolCallsFileSearchObject?(ToolCallsItem @this) => @this.FileSearch; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsFileSearchObject? value) { - RunStepDetailsFileSearchObject = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; init; } + public global::G.RunStepDetailsToolCallsFunctionObject? Function { get; init; } #else - public global::G.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; } + public global::G.RunStepDetailsToolCallsFunctionObject? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFunctionObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsRunStepDetailsFunctionObject => RunStepDetailsFunctionObject != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsFileSearchObject? value) /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsFunctionObject?(ToolCallsItem @this) => @this.RunStepDetailsFunctionObject; + public static implicit operator global::G.RunStepDetailsToolCallsFunctionObject?(ToolCallsItem @this) => @this.Function; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsFunctionObject? value) { - RunStepDetailsFunctionObject = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsFunctionObject? value) /// public ToolCallsItem( global::G.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? type, - global::G.RunStepDetailsToolCallsCodeObject? runStepDetailsCodeObject, - global::G.RunStepDetailsToolCallsFileSearchObject? runStepDetailsFileSearchObject, - global::G.RunStepDetailsToolCallsFunctionObject? runStepDetailsFunctionObject + global::G.RunStepDetailsToolCallsCodeObject? codeInterpreter, + global::G.RunStepDetailsToolCallsFileSearchObject? fileSearch, + global::G.RunStepDetailsToolCallsFunctionObject? function ) { Type = type; - RunStepDetailsCodeObject = runStepDetailsCodeObject; - RunStepDetailsFileSearchObject = runStepDetailsFileSearchObject; - RunStepDetailsFunctionObject = runStepDetailsFunctionObject; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - RunStepDetailsFunctionObject as object ?? - RunStepDetailsFileSearchObject as object ?? - RunStepDetailsCodeObject as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ RunStepDetailsCodeObject as object /// public bool Validate() { - return IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && IsRunStepDetailsFunctionObject; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? runStepDetailsCodeObject = null, - global::System.Func? runStepDetailsFileSearchObject = null, - global::System.Func? runStepDetailsFunctionObject = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsRunStepDetailsCodeObject && runStepDetailsCodeObject != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return runStepDetailsCodeObject(RunStepDetailsCodeObject!); + return codeInterpreter(CodeInterpreter!); } - else if (IsRunStepDetailsFileSearchObject && runStepDetailsFileSearchObject != null) + else if (IsFileSearch && fileSearch != null) { - return runStepDetailsFileSearchObject(RunStepDetailsFileSearchObject!); + return fileSearch(FileSearch!); } - else if (IsRunStepDetailsFunctionObject && runStepDetailsFunctionObject != null) + else if (IsFunction && function != null) { - return runStepDetailsFunctionObject(RunStepDetailsFunctionObject!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? runStepDetailsCodeObject = null, - global::System.Action? runStepDetailsFileSearchObject = null, - global::System.Action? runStepDetailsFunctionObject = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsRunStepDetailsCodeObject) + if (IsCodeInterpreter) { - runStepDetailsCodeObject?.Invoke(RunStepDetailsCodeObject!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsRunStepDetailsFileSearchObject) + else if (IsFileSearch) { - runStepDetailsFileSearchObject?.Invoke(RunStepDetailsFileSearchObject!); + fileSearch?.Invoke(FileSearch!); } - else if (IsRunStepDetailsFunctionObject) + else if (IsFunction) { - runStepDetailsFunctionObject?.Invoke(RunStepDetailsFunctionObject!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - RunStepDetailsCodeObject, + CodeInterpreter, typeof(global::G.RunStepDetailsToolCallsCodeObject), - RunStepDetailsFileSearchObject, + FileSearch, typeof(global::G.RunStepDetailsToolCallsFileSearchObject), - RunStepDetailsFunctionObject, + Function, typeof(global::G.RunStepDetailsToolCallsFunctionObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolCallsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsCodeObject, other.RunStepDetailsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFileSearchObject, other.RunStepDetailsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFunctionObject, other.RunStepDetailsFunctionObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem2.g.verified.cs index fe2ea4c09c..58d6ccb2b6 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolCallsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Details of the Code Interpreter tool call the run step was involved in. /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? CodeInterpreter { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsCodeObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsRunStepDeltaDetailsCodeObject => RunStepDeltaDetailsCodeObject != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsCodeObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsCodeObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsCodeObject?(ToolCallsItem2 @this) => @this.CodeInterpreter; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsCodeObject? value) { - RunStepDeltaDetailsCodeObject = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? FileSearch { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFileSearchObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsRunStepDeltaDetailsFileSearchObject => RunStepDeltaDetailsFileSearchObject != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsCodeObject? valu /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsFileSearchObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject?(ToolCallsItem2 @this) => @this.FileSearch; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? value) { - RunStepDeltaDetailsFileSearchObject = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? Function { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFunctionObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsRunStepDeltaDetailsFunctionObject => RunStepDeltaDetailsFunctionObject != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFunctionObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsFunctionObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFunctionObject?(ToolCallsItem2 @this) => @this.Function; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? value) { - RunStepDeltaDetailsFunctionObject = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? /// public ToolCallsItem2( global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? type, - global::G.RunStepDeltaStepDetailsToolCallsCodeObject? runStepDeltaDetailsCodeObject, - global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? runStepDeltaDetailsFileSearchObject, - global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? runStepDeltaDetailsFunctionObject + global::G.RunStepDeltaStepDetailsToolCallsCodeObject? codeInterpreter, + global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? fileSearch, + global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? function ) { Type = type; - RunStepDeltaDetailsCodeObject = runStepDeltaDetailsCodeObject; - RunStepDeltaDetailsFileSearchObject = runStepDeltaDetailsFileSearchObject; - RunStepDeltaDetailsFunctionObject = runStepDeltaDetailsFunctionObject; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - RunStepDeltaDetailsFunctionObject as object ?? - RunStepDeltaDetailsFileSearchObject as object ?? - RunStepDeltaDetailsCodeObject as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ RunStepDeltaDetailsCodeObject as object /// public bool Validate() { - return IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && IsRunStepDeltaDetailsFunctionObject; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? runStepDeltaDetailsCodeObject = null, - global::System.Func? runStepDeltaDetailsFileSearchObject = null, - global::System.Func? runStepDeltaDetailsFunctionObject = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsRunStepDeltaDetailsCodeObject && runStepDeltaDetailsCodeObject != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return runStepDeltaDetailsCodeObject(RunStepDeltaDetailsCodeObject!); + return codeInterpreter(CodeInterpreter!); } - else if (IsRunStepDeltaDetailsFileSearchObject && runStepDeltaDetailsFileSearchObject != null) + else if (IsFileSearch && fileSearch != null) { - return runStepDeltaDetailsFileSearchObject(RunStepDeltaDetailsFileSearchObject!); + return fileSearch(FileSearch!); } - else if (IsRunStepDeltaDetailsFunctionObject && runStepDeltaDetailsFunctionObject != null) + else if (IsFunction && function != null) { - return runStepDeltaDetailsFunctionObject(RunStepDeltaDetailsFunctionObject!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? runStepDeltaDetailsCodeObject = null, - global::System.Action? runStepDeltaDetailsFileSearchObject = null, - global::System.Action? runStepDeltaDetailsFunctionObject = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsRunStepDeltaDetailsCodeObject) + if (IsCodeInterpreter) { - runStepDeltaDetailsCodeObject?.Invoke(RunStepDeltaDetailsCodeObject!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsRunStepDeltaDetailsFileSearchObject) + else if (IsFileSearch) { - runStepDeltaDetailsFileSearchObject?.Invoke(RunStepDeltaDetailsFileSearchObject!); + fileSearch?.Invoke(FileSearch!); } - else if (IsRunStepDeltaDetailsFunctionObject) + else if (IsFunction) { - runStepDeltaDetailsFunctionObject?.Invoke(RunStepDeltaDetailsFunctionObject!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - RunStepDeltaDetailsCodeObject, + CodeInterpreter, typeof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject), - RunStepDeltaDetailsFileSearchObject, + FileSearch, typeof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject), - RunStepDeltaDetailsFunctionObject, + Function, typeof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolCallsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsCodeObject, other.RunStepDeltaDetailsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFileSearchObject, other.RunStepDeltaDetailsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFunctionObject, other.RunStepDeltaDetailsFunctionObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem.g.verified.cs index 3c622cf4e0..b074a6c6ad 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem @this) => @this.CodeInterpreter; /// /// /// public ToolsItem(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem @this) => @this.FileSearch; /// /// /// public ToolsItem(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem @this) => @this.Function; /// /// /// public ToolsItem(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem(global::G.AssistantToolsFunction? value) /// public ToolsItem( global::G.AssistantObjectToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem2.g.verified.cs index 8629901f78..0d2cefa304 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem2 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem2 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem2(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem2(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem2 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem2 @this) => @this.FileSearch; /// /// /// public ToolsItem2(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem2(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem2 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem2 @this) => @this.Function; /// /// /// public ToolsItem2(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem2(global::G.AssistantToolsFunction? value) /// public ToolsItem2( global::G.CreateAssistantRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem3.g.verified.cs index 8ce566dcfe..bcf4079040 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem3 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem3 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem3(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem3(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem3 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem3 @this) => @this.FileSearch; /// /// /// public ToolsItem3(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem3(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem3 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem3 @this) => @this.Function; /// /// /// public ToolsItem3(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem3(global::G.AssistantToolsFunction? value) /// public ToolsItem3( global::G.ModifyAssistantRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem4.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem4.g.verified.cs index 558edac9ca..c7ba95c2eb 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem4.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem4.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem4 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem4 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem4(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem4(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem4 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem4 @this) => @this.FileSearch; /// /// /// public ToolsItem4(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem4(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem4 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem4 @this) => @this.Function; /// /// /// public ToolsItem4(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem4(global::G.AssistantToolsFunction? value) /// public ToolsItem4( global::G.RunObjectToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem4 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem5.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem5.g.verified.cs index c223c5fe47..ff3b176d2a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem5.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem5.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem5 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem5 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem5(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem5(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem5 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem5 @this) => @this.FileSearch; /// /// /// public ToolsItem5(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem5(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem5 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem5 @this) => @this.Function; /// /// /// public ToolsItem5(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem5(global::G.AssistantToolsFunction? value) /// public ToolsItem5( global::G.CreateRunRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem5 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem6.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem6.g.verified.cs index 61b59ae30d..a58aee1d79 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem6.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem6.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem6 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem6 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem6(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem6(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem6 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem6 @this) => @this.FileSearch; /// /// /// public ToolsItem6(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem6(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem6 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem6 @this) => @this.Function; /// /// /// public ToolsItem6(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem6(global::G.AssistantToolsFunction? value) /// public ToolsItem6( global::G.CreateThreadAndRunRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem6 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem7.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem7.g.verified.cs index 511aca533c..6d55a985a7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem7.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem7.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem7 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem7 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem7(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,14 +76,14 @@ public ToolsItem7(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem7 @this) => @this.AssistantFileSearchTypeOnly; + public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem7 @this) => @this.FileSearch; /// /// /// public ToolsItem7(global::G.AssistantToolsFileSearchTypeOnly? value) { - AssistantFileSearchTypeOnly = value; + FileSearch = value; } /// @@ -91,22 +91,22 @@ public ToolsItem7(global::G.AssistantToolsFileSearchTypeOnly? value) /// public ToolsItem7( global::G.MessageObjectAttachmentToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearchTypeOnly? fileSearch ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; } /// /// /// public object? Object => - AssistantFileSearchTypeOnly as object ?? - AssistantCode as object + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -114,15 +114,15 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + return IsCodeInterpreter && !IsFileSearch || !IsCodeInterpreter && IsFileSearch; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearchTypeOnly = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + return fileSearch(FileSearch!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearchTypeOnly = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly) + else if (IsFileSearch) { - assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + fileSearch?.Invoke(FileSearch!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearchTypeOnly, + FileSearch, typeof(global::G.AssistantToolsFileSearchTypeOnly), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem7 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem8.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem8.g.verified.cs index ad23299029..7d9ad513cd 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem8.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.ToolsItem8.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem8 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem8 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem8(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,14 +76,14 @@ public ToolsItem8(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem8 @this) => @this.AssistantFileSearchTypeOnly; + public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem8 @this) => @this.FileSearch; /// /// /// public ToolsItem8(global::G.AssistantToolsFileSearchTypeOnly? value) { - AssistantFileSearchTypeOnly = value; + FileSearch = value; } /// @@ -91,22 +91,22 @@ public ToolsItem8(global::G.AssistantToolsFileSearchTypeOnly? value) /// public ToolsItem8( global::G.CreateMessageRequestAttachmentToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearchTypeOnly? fileSearch ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; } /// /// /// public object? Object => - AssistantFileSearchTypeOnly as object ?? - AssistantCode as object + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -114,15 +114,15 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + return IsCodeInterpreter && !IsFileSearch || !IsCodeInterpreter && IsFileSearch; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearchTypeOnly = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + return fileSearch(FileSearch!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearchTypeOnly = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly) + else if (IsFileSearch) { - assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + fileSearch?.Invoke(FileSearch!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearchTypeOnly, + FileSearch, typeof(global::G.AssistantToolsFileSearchTypeOnly), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem8 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs index e71ba130a2..783ee23fe2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.StaticChunkingStrategyResponseParam? StaticResponseParam { get; init; } + public global::G.StaticChunkingStrategyResponseParam? Static { get; init; } #else - public global::G.StaticChunkingStrategyResponseParam? StaticResponseParam { get; } + public global::G.StaticChunkingStrategyResponseParam? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticResponseParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsStaticResponseParam => StaticResponseParam != null; + public bool IsStatic => Static != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StaticChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.StaticResponseParam; + public static implicit operator global::G.StaticChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.Static; /// /// /// public VectorStoreFileObjectChunkingStrategy(global::G.StaticChunkingStrategyResponseParam? value) { - StaticResponseParam = value; + Static = value; } /// /// This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API. /// #if NET6_0_OR_GREATER - public global::G.OtherChunkingStrategyResponseParam? OtherResponseParam { get; init; } + public global::G.OtherChunkingStrategyResponseParam? Other { get; init; } #else - public global::G.OtherChunkingStrategyResponseParam? OtherResponseParam { get; } + public global::G.OtherChunkingStrategyResponseParam? Other { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OtherResponseParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Other))] #endif - public bool IsOtherResponseParam => OtherResponseParam != null; + public bool IsOther => Other != null; /// /// @@ -76,14 +76,14 @@ public VectorStoreFileObjectChunkingStrategy(global::G.StaticChunkingStrategyRes /// /// /// - public static implicit operator global::G.OtherChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.OtherResponseParam; + public static implicit operator global::G.OtherChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.Other; /// /// /// public VectorStoreFileObjectChunkingStrategy(global::G.OtherChunkingStrategyResponseParam? value) { - OtherResponseParam = value; + Other = value; } /// @@ -91,22 +91,22 @@ public VectorStoreFileObjectChunkingStrategy(global::G.OtherChunkingStrategyResp /// public VectorStoreFileObjectChunkingStrategy( global::G.VectorStoreFileObjectChunkingStrategyDiscriminatorType? type, - global::G.StaticChunkingStrategyResponseParam? staticResponseParam, - global::G.OtherChunkingStrategyResponseParam? otherResponseParam + global::G.StaticChunkingStrategyResponseParam? @static, + global::G.OtherChunkingStrategyResponseParam? other ) { Type = type; - StaticResponseParam = staticResponseParam; - OtherResponseParam = otherResponseParam; + Static = @static; + Other = other; } /// /// /// public object? Object => - OtherResponseParam as object ?? - StaticResponseParam as object + Other as object ?? + Static as object ; /// @@ -114,15 +114,15 @@ StaticResponseParam as object /// public bool Validate() { - return IsStaticResponseParam && !IsOtherResponseParam || !IsStaticResponseParam && IsOtherResponseParam; + return IsStatic && !IsOther || !IsStatic && IsOther; } /// /// /// public TResult? Match( - global::System.Func? staticResponseParam = null, - global::System.Func? otherResponseParam = null, + global::System.Func? @static = null, + global::System.Func? other = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsStaticResponseParam && staticResponseParam != null) + if (IsStatic && @static != null) { - return staticResponseParam(StaticResponseParam!); + return @static(Static!); } - else if (IsOtherResponseParam && otherResponseParam != null) + else if (IsOther && other != null) { - return otherResponseParam(OtherResponseParam!); + return other(Other!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? staticResponseParam = null, - global::System.Action? otherResponseParam = null, + global::System.Action? @static = null, + global::System.Action? other = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsStaticResponseParam) + if (IsStatic) { - staticResponseParam?.Invoke(StaticResponseParam!); + @static?.Invoke(Static!); } - else if (IsOtherResponseParam) + else if (IsOther) { - otherResponseParam?.Invoke(OtherResponseParam!); + other?.Invoke(Other!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - StaticResponseParam, + Static, typeof(global::G.StaticChunkingStrategyResponseParam), - OtherResponseParam, + Other, typeof(global::G.OtherChunkingStrategyResponseParam), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(VectorStoreFileObjectChunkingStrategy other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticResponseParam, other.StaticResponseParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OtherResponseParam, other.OtherResponseParam) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Other, other.Other) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem.g.verified.cs index 859d576238..9140e4f1a5 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; init; } + public global::G.MessageContentTextAnnotationsFileCitationObject? FileCitation { get; init; } #else - public global::G.MessageContentTextAnnotationsFileCitationObject? MessageContentTextFileCitationObject { get; } + public global::G.MessageContentTextAnnotationsFileCitationObject? FileCitation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFileCitationObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitation))] #endif - public bool IsMessageContentTextFileCitationObject => MessageContentTextFileCitationObject != null; + public bool IsFileCitation => FileCitation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentTextAnnotationsFileCitationObject?(AnnotationsItem @this) => @this.MessageContentTextFileCitationObject; + public static implicit operator global::G.MessageContentTextAnnotationsFileCitationObject?(AnnotationsItem @this) => @this.FileCitation; /// /// /// public AnnotationsItem(global::G.MessageContentTextAnnotationsFileCitationObject? value) { - MessageContentTextFileCitationObject = value; + FileCitation = value; } /// /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; init; } + public global::G.MessageContentTextAnnotationsFilePathObject? FilePath { get; init; } #else - public global::G.MessageContentTextAnnotationsFilePathObject? MessageContentTextFilePathObject { get; } + public global::G.MessageContentTextAnnotationsFilePathObject? FilePath { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageContentTextFilePathObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] #endif - public bool IsMessageContentTextFilePathObject => MessageContentTextFilePathObject != null; + public bool IsFilePath => FilePath != null; /// /// @@ -76,14 +76,14 @@ public AnnotationsItem(global::G.MessageContentTextAnnotationsFileCitationObject /// /// /// - public static implicit operator global::G.MessageContentTextAnnotationsFilePathObject?(AnnotationsItem @this) => @this.MessageContentTextFilePathObject; + public static implicit operator global::G.MessageContentTextAnnotationsFilePathObject?(AnnotationsItem @this) => @this.FilePath; /// /// /// public AnnotationsItem(global::G.MessageContentTextAnnotationsFilePathObject? value) { - MessageContentTextFilePathObject = value; + FilePath = value; } /// @@ -91,22 +91,22 @@ public AnnotationsItem(global::G.MessageContentTextAnnotationsFilePathObject? va /// public AnnotationsItem( global::G.MessageContentTextObjectTextAnnotationDiscriminatorType? type, - global::G.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject, - global::G.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject + global::G.MessageContentTextAnnotationsFileCitationObject? fileCitation, + global::G.MessageContentTextAnnotationsFilePathObject? filePath ) { Type = type; - MessageContentTextFileCitationObject = messageContentTextFileCitationObject; - MessageContentTextFilePathObject = messageContentTextFilePathObject; + FileCitation = fileCitation; + FilePath = filePath; } /// /// /// public object? Object => - MessageContentTextFilePathObject as object ?? - MessageContentTextFileCitationObject as object + FilePath as object ?? + FileCitation as object ; /// @@ -114,15 +114,15 @@ MessageContentTextFileCitationObject as object /// public bool Validate() { - return IsMessageContentTextFileCitationObject && !IsMessageContentTextFilePathObject || !IsMessageContentTextFileCitationObject && IsMessageContentTextFilePathObject; + return IsFileCitation && !IsFilePath || !IsFileCitation && IsFilePath; } /// /// /// public TResult? Match( - global::System.Func? messageContentTextFileCitationObject = null, - global::System.Func? messageContentTextFilePathObject = null, + global::System.Func? fileCitation = null, + global::System.Func? filePath = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsMessageContentTextFileCitationObject && messageContentTextFileCitationObject != null) + if (IsFileCitation && fileCitation != null) { - return messageContentTextFileCitationObject(MessageContentTextFileCitationObject!); + return fileCitation(FileCitation!); } - else if (IsMessageContentTextFilePathObject && messageContentTextFilePathObject != null) + else if (IsFilePath && filePath != null) { - return messageContentTextFilePathObject(MessageContentTextFilePathObject!); + return filePath(FilePath!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageContentTextFileCitationObject = null, - global::System.Action? messageContentTextFilePathObject = null, + global::System.Action? fileCitation = null, + global::System.Action? filePath = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsMessageContentTextFileCitationObject) + if (IsFileCitation) { - messageContentTextFileCitationObject?.Invoke(MessageContentTextFileCitationObject!); + fileCitation?.Invoke(FileCitation!); } - else if (IsMessageContentTextFilePathObject) + else if (IsFilePath) { - messageContentTextFilePathObject?.Invoke(MessageContentTextFilePathObject!); + filePath?.Invoke(FilePath!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - MessageContentTextFileCitationObject, + FileCitation, typeof(global::G.MessageContentTextAnnotationsFileCitationObject), - MessageContentTextFilePathObject, + FilePath, typeof(global::G.MessageContentTextAnnotationsFilePathObject), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AnnotationsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFileCitationObject, other.MessageContentTextFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageContentTextFilePathObject, other.MessageContentTextFilePathObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitation, other.FileCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePath, other.FilePath) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem2.g.verified.cs index 2226d658e4..73d531a7f2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AnnotationsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; init; } + public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? FileCitation { get; init; } #else - public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? MessageDeltaContentTextFileCitationObject { get; } + public global::G.MessageDeltaContentTextAnnotationsFileCitationObject? FileCitation { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFileCitationObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileCitation))] #endif - public bool IsMessageDeltaContentTextFileCitationObject => MessageDeltaContentTextFileCitationObject != null; + public bool IsFileCitation => FileCitation != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageDeltaContentTextAnnotationsFileCitationObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFileCitationObject; + public static implicit operator global::G.MessageDeltaContentTextAnnotationsFileCitationObject?(AnnotationsItem2 @this) => @this.FileCitation; /// /// /// public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFileCitationObject? value) { - MessageDeltaContentTextFileCitationObject = value; + FileCitation = value; } /// /// A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; init; } + public global::G.MessageDeltaContentTextAnnotationsFilePathObject? FilePath { get; init; } #else - public global::G.MessageDeltaContentTextAnnotationsFilePathObject? MessageDeltaContentTextFilePathObject { get; } + public global::G.MessageDeltaContentTextAnnotationsFilePathObject? FilePath { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaContentTextFilePathObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FilePath))] #endif - public bool IsMessageDeltaContentTextFilePathObject => MessageDeltaContentTextFilePathObject != null; + public bool IsFilePath => FilePath != null; /// /// @@ -76,14 +76,14 @@ public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFileCitation /// /// /// - public static implicit operator global::G.MessageDeltaContentTextAnnotationsFilePathObject?(AnnotationsItem2 @this) => @this.MessageDeltaContentTextFilePathObject; + public static implicit operator global::G.MessageDeltaContentTextAnnotationsFilePathObject?(AnnotationsItem2 @this) => @this.FilePath; /// /// /// public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFilePathObject? value) { - MessageDeltaContentTextFilePathObject = value; + FilePath = value; } /// @@ -91,22 +91,22 @@ public AnnotationsItem2(global::G.MessageDeltaContentTextAnnotationsFilePathObje /// public AnnotationsItem2( global::G.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType? type, - global::G.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject, - global::G.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject + global::G.MessageDeltaContentTextAnnotationsFileCitationObject? fileCitation, + global::G.MessageDeltaContentTextAnnotationsFilePathObject? filePath ) { Type = type; - MessageDeltaContentTextFileCitationObject = messageDeltaContentTextFileCitationObject; - MessageDeltaContentTextFilePathObject = messageDeltaContentTextFilePathObject; + FileCitation = fileCitation; + FilePath = filePath; } /// /// /// public object? Object => - MessageDeltaContentTextFilePathObject as object ?? - MessageDeltaContentTextFileCitationObject as object + FilePath as object ?? + FileCitation as object ; /// @@ -114,15 +114,15 @@ MessageDeltaContentTextFileCitationObject as object /// public bool Validate() { - return IsMessageDeltaContentTextFileCitationObject && !IsMessageDeltaContentTextFilePathObject || !IsMessageDeltaContentTextFileCitationObject && IsMessageDeltaContentTextFilePathObject; + return IsFileCitation && !IsFilePath || !IsFileCitation && IsFilePath; } /// /// /// public TResult? Match( - global::System.Func? messageDeltaContentTextFileCitationObject = null, - global::System.Func? messageDeltaContentTextFilePathObject = null, + global::System.Func? fileCitation = null, + global::System.Func? filePath = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsMessageDeltaContentTextFileCitationObject && messageDeltaContentTextFileCitationObject != null) + if (IsFileCitation && fileCitation != null) { - return messageDeltaContentTextFileCitationObject(MessageDeltaContentTextFileCitationObject!); + return fileCitation(FileCitation!); } - else if (IsMessageDeltaContentTextFilePathObject && messageDeltaContentTextFilePathObject != null) + else if (IsFilePath && filePath != null) { - return messageDeltaContentTextFilePathObject(MessageDeltaContentTextFilePathObject!); + return filePath(FilePath!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageDeltaContentTextFileCitationObject = null, - global::System.Action? messageDeltaContentTextFilePathObject = null, + global::System.Action? fileCitation = null, + global::System.Action? filePath = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsMessageDeltaContentTextFileCitationObject) + if (IsFileCitation) { - messageDeltaContentTextFileCitationObject?.Invoke(MessageDeltaContentTextFileCitationObject!); + fileCitation?.Invoke(FileCitation!); } - else if (IsMessageDeltaContentTextFilePathObject) + else if (IsFilePath) { - messageDeltaContentTextFilePathObject?.Invoke(MessageDeltaContentTextFilePathObject!); + filePath?.Invoke(FilePath!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - MessageDeltaContentTextFileCitationObject, + FileCitation, typeof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject), - MessageDeltaContentTextFilePathObject, + FilePath, typeof(global::G.MessageDeltaContentTextAnnotationsFilePathObject), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AnnotationsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFileCitationObject, other.MessageDeltaContentTextFileCitationObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaContentTextFilePathObject, other.MessageDeltaContentTextFilePathObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileCitation, other.FileCitation) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FilePath, other.FilePath) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AssistantStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AssistantStreamEvent.g.verified.cs index 141ab7385c..9bf689a008 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AssistantStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.AssistantStreamEvent.g.verified.cs @@ -34,18 +34,18 @@ namespace G /// Occurs when an [error](/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout. /// #if NET6_0_OR_GREATER - public global::G.ErrorEvent? Value1 { get; init; } + public global::G.ErrorEvent? Error { get; init; } #else - public global::G.ErrorEvent? Value1 { get; } + public global::G.ErrorEvent? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsValue1 => Value1 != null; + public bool IsError => Error != null; /// /// @@ -55,32 +55,32 @@ namespace G /// /// /// - public static implicit operator global::G.ErrorEvent?(AssistantStreamEvent @this) => @this.Value1; + public static implicit operator global::G.ErrorEvent?(AssistantStreamEvent @this) => @this.Error; /// /// /// public AssistantStreamEvent(global::G.ErrorEvent? value) { - Value1 = value; + Error = value; } /// /// Occurs when a stream ends. /// #if NET6_0_OR_GREATER - public global::G.DoneEvent? Value2 { get; init; } + public global::G.DoneEvent? Done { get; init; } #else - public global::G.DoneEvent? Value2 { get; } + public global::G.DoneEvent? Done { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Done))] #endif - public bool IsValue2 => Value2 != null; + public bool IsDone => Done != null; /// /// @@ -90,32 +90,32 @@ public AssistantStreamEvent(global::G.ErrorEvent? value) /// /// /// - public static implicit operator global::G.DoneEvent?(AssistantStreamEvent @this) => @this.Value2; + public static implicit operator global::G.DoneEvent?(AssistantStreamEvent @this) => @this.Done; /// /// /// public AssistantStreamEvent(global::G.DoneEvent? value) { - Value2 = value; + Done = value; } /// /// Occurs when a new [thread](/docs/api-reference/threads/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant3? Value3 { get; init; } + public global::G.AssistantStreamEventVariant3? ThreadCreated { get; init; } #else - public global::G.AssistantStreamEventVariant3? Value3 { get; } + public global::G.AssistantStreamEventVariant3? ThreadCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadCreated))] #endif - public bool IsValue3 => Value3 != null; + public bool IsThreadCreated => ThreadCreated != null; /// /// @@ -125,32 +125,32 @@ public AssistantStreamEvent(global::G.DoneEvent? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant3?(AssistantStreamEvent @this) => @this.Value3; + public static implicit operator global::G.AssistantStreamEventVariant3?(AssistantStreamEvent @this) => @this.ThreadCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant3? value) { - Value3 = value; + ThreadCreated = value; } /// /// Occurs when a new [run](/docs/api-reference/runs/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant4? Value4 { get; init; } + public global::G.AssistantStreamEventVariant4? ThreadRunCreated { get; init; } #else - public global::G.AssistantStreamEventVariant4? Value4 { get; } + public global::G.AssistantStreamEventVariant4? ThreadRunCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCreated))] #endif - public bool IsValue4 => Value4 != null; + public bool IsThreadRunCreated => ThreadRunCreated != null; /// /// @@ -160,32 +160,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant3? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant4?(AssistantStreamEvent @this) => @this.Value4; + public static implicit operator global::G.AssistantStreamEventVariant4?(AssistantStreamEvent @this) => @this.ThreadRunCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant4? value) { - Value4 = value; + ThreadRunCreated = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant5? Value5 { get; init; } + public global::G.AssistantStreamEventVariant5? ThreadRunQueued { get; init; } #else - public global::G.AssistantStreamEventVariant5? Value5 { get; } + public global::G.AssistantStreamEventVariant5? ThreadRunQueued { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value5))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunQueued))] #endif - public bool IsValue5 => Value5 != null; + public bool IsThreadRunQueued => ThreadRunQueued != null; /// /// @@ -195,32 +195,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant4? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant5?(AssistantStreamEvent @this) => @this.Value5; + public static implicit operator global::G.AssistantStreamEventVariant5?(AssistantStreamEvent @this) => @this.ThreadRunQueued; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant5? value) { - Value5 = value; + ThreadRunQueued = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant6? Value6 { get; init; } + public global::G.AssistantStreamEventVariant6? ThreadRunInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant6? Value6 { get; } + public global::G.AssistantStreamEventVariant6? ThreadRunInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value6))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunInProgress))] #endif - public bool IsValue6 => Value6 != null; + public bool IsThreadRunInProgress => ThreadRunInProgress != null; /// /// @@ -230,32 +230,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant5? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant6?(AssistantStreamEvent @this) => @this.Value6; + public static implicit operator global::G.AssistantStreamEventVariant6?(AssistantStreamEvent @this) => @this.ThreadRunInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant6? value) { - Value6 = value; + ThreadRunInProgress = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant7? Value7 { get; init; } + public global::G.AssistantStreamEventVariant7? ThreadRunRequiresAction { get; init; } #else - public global::G.AssistantStreamEventVariant7? Value7 { get; } + public global::G.AssistantStreamEventVariant7? ThreadRunRequiresAction { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value7))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunRequiresAction))] #endif - public bool IsValue7 => Value7 != null; + public bool IsThreadRunRequiresAction => ThreadRunRequiresAction != null; /// /// @@ -265,32 +265,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant6? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant7?(AssistantStreamEvent @this) => @this.Value7; + public static implicit operator global::G.AssistantStreamEventVariant7?(AssistantStreamEvent @this) => @this.ThreadRunRequiresAction; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant7? value) { - Value7 = value; + ThreadRunRequiresAction = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant8? Value8 { get; init; } + public global::G.AssistantStreamEventVariant8? ThreadRunCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant8? Value8 { get; } + public global::G.AssistantStreamEventVariant8? ThreadRunCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value8))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCompleted))] #endif - public bool IsValue8 => Value8 != null; + public bool IsThreadRunCompleted => ThreadRunCompleted != null; /// /// @@ -300,32 +300,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant7? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant8?(AssistantStreamEvent @this) => @this.Value8; + public static implicit operator global::G.AssistantStreamEventVariant8?(AssistantStreamEvent @this) => @this.ThreadRunCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant8? value) { - Value8 = value; + ThreadRunCompleted = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) ends with status `incomplete`. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant9? Value9 { get; init; } + public global::G.AssistantStreamEventVariant9? ThreadRunIncomplete { get; init; } #else - public global::G.AssistantStreamEventVariant9? Value9 { get; } + public global::G.AssistantStreamEventVariant9? ThreadRunIncomplete { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value9))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunIncomplete))] #endif - public bool IsValue9 => Value9 != null; + public bool IsThreadRunIncomplete => ThreadRunIncomplete != null; /// /// @@ -335,32 +335,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant8? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant9?(AssistantStreamEvent @this) => @this.Value9; + public static implicit operator global::G.AssistantStreamEventVariant9?(AssistantStreamEvent @this) => @this.ThreadRunIncomplete; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant9? value) { - Value9 = value; + ThreadRunIncomplete = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) fails. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant10? Value10 { get; init; } + public global::G.AssistantStreamEventVariant10? ThreadRunFailed { get; init; } #else - public global::G.AssistantStreamEventVariant10? Value10 { get; } + public global::G.AssistantStreamEventVariant10? ThreadRunFailed { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value10))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunFailed))] #endif - public bool IsValue10 => Value10 != null; + public bool IsThreadRunFailed => ThreadRunFailed != null; /// /// @@ -370,32 +370,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant9? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant10?(AssistantStreamEvent @this) => @this.Value10; + public static implicit operator global::G.AssistantStreamEventVariant10?(AssistantStreamEvent @this) => @this.ThreadRunFailed; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant10? value) { - Value10 = value; + ThreadRunFailed = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant11? Value11 { get; init; } + public global::G.AssistantStreamEventVariant11? ThreadRunCancelling { get; init; } #else - public global::G.AssistantStreamEventVariant11? Value11 { get; } + public global::G.AssistantStreamEventVariant11? ThreadRunCancelling { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value11))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCancelling))] #endif - public bool IsValue11 => Value11 != null; + public bool IsThreadRunCancelling => ThreadRunCancelling != null; /// /// @@ -405,32 +405,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant10? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant11?(AssistantStreamEvent @this) => @this.Value11; + public static implicit operator global::G.AssistantStreamEventVariant11?(AssistantStreamEvent @this) => @this.ThreadRunCancelling; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant11? value) { - Value11 = value; + ThreadRunCancelling = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) is cancelled. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant12? Value12 { get; init; } + public global::G.AssistantStreamEventVariant12? ThreadRunCancelled { get; init; } #else - public global::G.AssistantStreamEventVariant12? Value12 { get; } + public global::G.AssistantStreamEventVariant12? ThreadRunCancelled { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value12))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunCancelled))] #endif - public bool IsValue12 => Value12 != null; + public bool IsThreadRunCancelled => ThreadRunCancelled != null; /// /// @@ -440,32 +440,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant11? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant12?(AssistantStreamEvent @this) => @this.Value12; + public static implicit operator global::G.AssistantStreamEventVariant12?(AssistantStreamEvent @this) => @this.ThreadRunCancelled; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant12? value) { - Value12 = value; + ThreadRunCancelled = value; } /// /// Occurs when a [run](/docs/api-reference/runs/object) expires. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant13? Value13 { get; init; } + public global::G.AssistantStreamEventVariant13? ThreadRunExpired { get; init; } #else - public global::G.AssistantStreamEventVariant13? Value13 { get; } + public global::G.AssistantStreamEventVariant13? ThreadRunExpired { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value13))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunExpired))] #endif - public bool IsValue13 => Value13 != null; + public bool IsThreadRunExpired => ThreadRunExpired != null; /// /// @@ -475,32 +475,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant12? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant13?(AssistantStreamEvent @this) => @this.Value13; + public static implicit operator global::G.AssistantStreamEventVariant13?(AssistantStreamEvent @this) => @this.ThreadRunExpired; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant13? value) { - Value13 = value; + ThreadRunExpired = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant14? Value14 { get; init; } + public global::G.AssistantStreamEventVariant14? ThreadRunStepCreated { get; init; } #else - public global::G.AssistantStreamEventVariant14? Value14 { get; } + public global::G.AssistantStreamEventVariant14? ThreadRunStepCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value14))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCreated))] #endif - public bool IsValue14 => Value14 != null; + public bool IsThreadRunStepCreated => ThreadRunStepCreated != null; /// /// @@ -510,32 +510,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant13? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant14?(AssistantStreamEvent @this) => @this.Value14; + public static implicit operator global::G.AssistantStreamEventVariant14?(AssistantStreamEvent @this) => @this.ThreadRunStepCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant14? value) { - Value14 = value; + ThreadRunStepCreated = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant15? Value15 { get; init; } + public global::G.AssistantStreamEventVariant15? ThreadRunStepInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant15? Value15 { get; } + public global::G.AssistantStreamEventVariant15? ThreadRunStepInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value15))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepInProgress))] #endif - public bool IsValue15 => Value15 != null; + public bool IsThreadRunStepInProgress => ThreadRunStepInProgress != null; /// /// @@ -545,32 +545,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant14? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant15?(AssistantStreamEvent @this) => @this.Value15; + public static implicit operator global::G.AssistantStreamEventVariant15?(AssistantStreamEvent @this) => @this.ThreadRunStepInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant15? value) { - Value15 = value; + ThreadRunStepInProgress = value; } /// /// Occurs when parts of a [run step](/docs/api-reference/runs/step-object) are being streamed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant16? Value16 { get; init; } + public global::G.AssistantStreamEventVariant16? ThreadRunStepDelta { get; init; } #else - public global::G.AssistantStreamEventVariant16? Value16 { get; } + public global::G.AssistantStreamEventVariant16? ThreadRunStepDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value16))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepDelta))] #endif - public bool IsValue16 => Value16 != null; + public bool IsThreadRunStepDelta => ThreadRunStepDelta != null; /// /// @@ -580,32 +580,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant15? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant16?(AssistantStreamEvent @this) => @this.Value16; + public static implicit operator global::G.AssistantStreamEventVariant16?(AssistantStreamEvent @this) => @this.ThreadRunStepDelta; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant16? value) { - Value16 = value; + ThreadRunStepDelta = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant17? Value17 { get; init; } + public global::G.AssistantStreamEventVariant17? ThreadRunStepCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant17? Value17 { get; } + public global::G.AssistantStreamEventVariant17? ThreadRunStepCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value17))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCompleted))] #endif - public bool IsValue17 => Value17 != null; + public bool IsThreadRunStepCompleted => ThreadRunStepCompleted != null; /// /// @@ -615,32 +615,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant16? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant17?(AssistantStreamEvent @this) => @this.Value17; + public static implicit operator global::G.AssistantStreamEventVariant17?(AssistantStreamEvent @this) => @this.ThreadRunStepCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant17? value) { - Value17 = value; + ThreadRunStepCompleted = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) fails. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant18? Value18 { get; init; } + public global::G.AssistantStreamEventVariant18? ThreadRunStepFailed { get; init; } #else - public global::G.AssistantStreamEventVariant18? Value18 { get; } + public global::G.AssistantStreamEventVariant18? ThreadRunStepFailed { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value18))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepFailed))] #endif - public bool IsValue18 => Value18 != null; + public bool IsThreadRunStepFailed => ThreadRunStepFailed != null; /// /// @@ -650,32 +650,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant17? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant18?(AssistantStreamEvent @this) => @this.Value18; + public static implicit operator global::G.AssistantStreamEventVariant18?(AssistantStreamEvent @this) => @this.ThreadRunStepFailed; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant18? value) { - Value18 = value; + ThreadRunStepFailed = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) is cancelled. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant19? Value19 { get; init; } + public global::G.AssistantStreamEventVariant19? ThreadRunStepCancelled { get; init; } #else - public global::G.AssistantStreamEventVariant19? Value19 { get; } + public global::G.AssistantStreamEventVariant19? ThreadRunStepCancelled { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value19))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepCancelled))] #endif - public bool IsValue19 => Value19 != null; + public bool IsThreadRunStepCancelled => ThreadRunStepCancelled != null; /// /// @@ -685,32 +685,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant18? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant19?(AssistantStreamEvent @this) => @this.Value19; + public static implicit operator global::G.AssistantStreamEventVariant19?(AssistantStreamEvent @this) => @this.ThreadRunStepCancelled; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant19? value) { - Value19 = value; + ThreadRunStepCancelled = value; } /// /// Occurs when a [run step](/docs/api-reference/runs/step-object) expires. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant20? Value20 { get; init; } + public global::G.AssistantStreamEventVariant20? ThreadRunStepExpired { get; init; } #else - public global::G.AssistantStreamEventVariant20? Value20 { get; } + public global::G.AssistantStreamEventVariant20? ThreadRunStepExpired { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value20))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadRunStepExpired))] #endif - public bool IsValue20 => Value20 != null; + public bool IsThreadRunStepExpired => ThreadRunStepExpired != null; /// /// @@ -720,32 +720,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant19? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant20?(AssistantStreamEvent @this) => @this.Value20; + public static implicit operator global::G.AssistantStreamEventVariant20?(AssistantStreamEvent @this) => @this.ThreadRunStepExpired; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant20? value) { - Value20 = value; + ThreadRunStepExpired = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) is created. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant21? Value21 { get; init; } + public global::G.AssistantStreamEventVariant21? ThreadMessageCreated { get; init; } #else - public global::G.AssistantStreamEventVariant21? Value21 { get; } + public global::G.AssistantStreamEventVariant21? ThreadMessageCreated { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value21))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageCreated))] #endif - public bool IsValue21 => Value21 != null; + public bool IsThreadMessageCreated => ThreadMessageCreated != null; /// /// @@ -755,32 +755,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant20? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant21?(AssistantStreamEvent @this) => @this.Value21; + public static implicit operator global::G.AssistantStreamEventVariant21?(AssistantStreamEvent @this) => @this.ThreadMessageCreated; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant21? value) { - Value21 = value; + ThreadMessageCreated = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant22? Value22 { get; init; } + public global::G.AssistantStreamEventVariant22? ThreadMessageInProgress { get; init; } #else - public global::G.AssistantStreamEventVariant22? Value22 { get; } + public global::G.AssistantStreamEventVariant22? ThreadMessageInProgress { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value22))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageInProgress))] #endif - public bool IsValue22 => Value22 != null; + public bool IsThreadMessageInProgress => ThreadMessageInProgress != null; /// /// @@ -790,32 +790,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant21? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant22?(AssistantStreamEvent @this) => @this.Value22; + public static implicit operator global::G.AssistantStreamEventVariant22?(AssistantStreamEvent @this) => @this.ThreadMessageInProgress; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant22? value) { - Value22 = value; + ThreadMessageInProgress = value; } /// /// Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant23? Value23 { get; init; } + public global::G.AssistantStreamEventVariant23? ThreadMessageDelta { get; init; } #else - public global::G.AssistantStreamEventVariant23? Value23 { get; } + public global::G.AssistantStreamEventVariant23? ThreadMessageDelta { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value23))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageDelta))] #endif - public bool IsValue23 => Value23 != null; + public bool IsThreadMessageDelta => ThreadMessageDelta != null; /// /// @@ -825,32 +825,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant22? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant23?(AssistantStreamEvent @this) => @this.Value23; + public static implicit operator global::G.AssistantStreamEventVariant23?(AssistantStreamEvent @this) => @this.ThreadMessageDelta; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant23? value) { - Value23 = value; + ThreadMessageDelta = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant24? Value24 { get; init; } + public global::G.AssistantStreamEventVariant24? ThreadMessageCompleted { get; init; } #else - public global::G.AssistantStreamEventVariant24? Value24 { get; } + public global::G.AssistantStreamEventVariant24? ThreadMessageCompleted { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value24))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageCompleted))] #endif - public bool IsValue24 => Value24 != null; + public bool IsThreadMessageCompleted => ThreadMessageCompleted != null; /// /// @@ -860,32 +860,32 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant23? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant24?(AssistantStreamEvent @this) => @this.Value24; + public static implicit operator global::G.AssistantStreamEventVariant24?(AssistantStreamEvent @this) => @this.ThreadMessageCompleted; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant24? value) { - Value24 = value; + ThreadMessageCompleted = value; } /// /// Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed. /// #if NET6_0_OR_GREATER - public global::G.AssistantStreamEventVariant25? Value25 { get; init; } + public global::G.AssistantStreamEventVariant25? ThreadMessageIncomplete { get; init; } #else - public global::G.AssistantStreamEventVariant25? Value25 { get; } + public global::G.AssistantStreamEventVariant25? ThreadMessageIncomplete { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value25))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ThreadMessageIncomplete))] #endif - public bool IsValue25 => Value25 != null; + public bool IsThreadMessageIncomplete => ThreadMessageIncomplete != null; /// /// @@ -895,14 +895,14 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant24? value) /// /// /// - public static implicit operator global::G.AssistantStreamEventVariant25?(AssistantStreamEvent @this) => @this.Value25; + public static implicit operator global::G.AssistantStreamEventVariant25?(AssistantStreamEvent @this) => @this.ThreadMessageIncomplete; /// /// /// public AssistantStreamEvent(global::G.AssistantStreamEventVariant25? value) { - Value25 = value; + ThreadMessageIncomplete = value; } /// @@ -910,91 +910,91 @@ public AssistantStreamEvent(global::G.AssistantStreamEventVariant25? value) /// public AssistantStreamEvent( global::G.AssistantStreamEventDiscriminatorEvent? @event, - global::G.ErrorEvent? value1, - global::G.DoneEvent? value2, - global::G.AssistantStreamEventVariant3? value3, - global::G.AssistantStreamEventVariant4? value4, - global::G.AssistantStreamEventVariant5? value5, - global::G.AssistantStreamEventVariant6? value6, - global::G.AssistantStreamEventVariant7? value7, - global::G.AssistantStreamEventVariant8? value8, - global::G.AssistantStreamEventVariant9? value9, - global::G.AssistantStreamEventVariant10? value10, - global::G.AssistantStreamEventVariant11? value11, - global::G.AssistantStreamEventVariant12? value12, - global::G.AssistantStreamEventVariant13? value13, - global::G.AssistantStreamEventVariant14? value14, - global::G.AssistantStreamEventVariant15? value15, - global::G.AssistantStreamEventVariant16? value16, - global::G.AssistantStreamEventVariant17? value17, - global::G.AssistantStreamEventVariant18? value18, - global::G.AssistantStreamEventVariant19? value19, - global::G.AssistantStreamEventVariant20? value20, - global::G.AssistantStreamEventVariant21? value21, - global::G.AssistantStreamEventVariant22? value22, - global::G.AssistantStreamEventVariant23? value23, - global::G.AssistantStreamEventVariant24? value24, - global::G.AssistantStreamEventVariant25? value25 + global::G.ErrorEvent? error, + global::G.DoneEvent? done, + global::G.AssistantStreamEventVariant3? threadCreated, + global::G.AssistantStreamEventVariant4? threadRunCreated, + global::G.AssistantStreamEventVariant5? threadRunQueued, + global::G.AssistantStreamEventVariant6? threadRunInProgress, + global::G.AssistantStreamEventVariant7? threadRunRequiresAction, + global::G.AssistantStreamEventVariant8? threadRunCompleted, + global::G.AssistantStreamEventVariant9? threadRunIncomplete, + global::G.AssistantStreamEventVariant10? threadRunFailed, + global::G.AssistantStreamEventVariant11? threadRunCancelling, + global::G.AssistantStreamEventVariant12? threadRunCancelled, + global::G.AssistantStreamEventVariant13? threadRunExpired, + global::G.AssistantStreamEventVariant14? threadRunStepCreated, + global::G.AssistantStreamEventVariant15? threadRunStepInProgress, + global::G.AssistantStreamEventVariant16? threadRunStepDelta, + global::G.AssistantStreamEventVariant17? threadRunStepCompleted, + global::G.AssistantStreamEventVariant18? threadRunStepFailed, + global::G.AssistantStreamEventVariant19? threadRunStepCancelled, + global::G.AssistantStreamEventVariant20? threadRunStepExpired, + global::G.AssistantStreamEventVariant21? threadMessageCreated, + global::G.AssistantStreamEventVariant22? threadMessageInProgress, + global::G.AssistantStreamEventVariant23? threadMessageDelta, + global::G.AssistantStreamEventVariant24? threadMessageCompleted, + global::G.AssistantStreamEventVariant25? threadMessageIncomplete ) { Event = @event; - Value1 = value1; - Value2 = value2; - Value3 = value3; - Value4 = value4; - Value5 = value5; - Value6 = value6; - Value7 = value7; - Value8 = value8; - Value9 = value9; - Value10 = value10; - Value11 = value11; - Value12 = value12; - Value13 = value13; - Value14 = value14; - Value15 = value15; - Value16 = value16; - Value17 = value17; - Value18 = value18; - Value19 = value19; - Value20 = value20; - Value21 = value21; - Value22 = value22; - Value23 = value23; - Value24 = value24; - Value25 = value25; + Error = error; + Done = done; + ThreadCreated = threadCreated; + ThreadRunCreated = threadRunCreated; + ThreadRunQueued = threadRunQueued; + ThreadRunInProgress = threadRunInProgress; + ThreadRunRequiresAction = threadRunRequiresAction; + ThreadRunCompleted = threadRunCompleted; + ThreadRunIncomplete = threadRunIncomplete; + ThreadRunFailed = threadRunFailed; + ThreadRunCancelling = threadRunCancelling; + ThreadRunCancelled = threadRunCancelled; + ThreadRunExpired = threadRunExpired; + ThreadRunStepCreated = threadRunStepCreated; + ThreadRunStepInProgress = threadRunStepInProgress; + ThreadRunStepDelta = threadRunStepDelta; + ThreadRunStepCompleted = threadRunStepCompleted; + ThreadRunStepFailed = threadRunStepFailed; + ThreadRunStepCancelled = threadRunStepCancelled; + ThreadRunStepExpired = threadRunStepExpired; + ThreadMessageCreated = threadMessageCreated; + ThreadMessageInProgress = threadMessageInProgress; + ThreadMessageDelta = threadMessageDelta; + ThreadMessageCompleted = threadMessageCompleted; + ThreadMessageIncomplete = threadMessageIncomplete; } /// /// /// public object? Object => - Value25 as object ?? - Value24 as object ?? - Value23 as object ?? - Value22 as object ?? - Value21 as object ?? - Value20 as object ?? - Value19 as object ?? - Value18 as object ?? - Value17 as object ?? - Value16 as object ?? - Value15 as object ?? - Value14 as object ?? - Value13 as object ?? - Value12 as object ?? - Value11 as object ?? - Value10 as object ?? - Value9 as object ?? - Value8 as object ?? - Value7 as object ?? - Value6 as object ?? - Value5 as object ?? - Value4 as object ?? - Value3 as object ?? - Value2 as object ?? - Value1 as object + ThreadMessageIncomplete as object ?? + ThreadMessageCompleted as object ?? + ThreadMessageDelta as object ?? + ThreadMessageInProgress as object ?? + ThreadMessageCreated as object ?? + ThreadRunStepExpired as object ?? + ThreadRunStepCancelled as object ?? + ThreadRunStepFailed as object ?? + ThreadRunStepCompleted as object ?? + ThreadRunStepDelta as object ?? + ThreadRunStepInProgress as object ?? + ThreadRunStepCreated as object ?? + ThreadRunExpired as object ?? + ThreadRunCancelled as object ?? + ThreadRunCancelling as object ?? + ThreadRunFailed as object ?? + ThreadRunIncomplete as object ?? + ThreadRunCompleted as object ?? + ThreadRunRequiresAction as object ?? + ThreadRunInProgress as object ?? + ThreadRunQueued as object ?? + ThreadRunCreated as object ?? + ThreadCreated as object ?? + Done as object ?? + Error as object ; /// @@ -1002,38 +1002,38 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && IsValue22 && !IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && IsValue23 && !IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && IsValue24 && !IsValue25 || !IsValue1 && !IsValue2 && !IsValue3 && !IsValue4 && !IsValue5 && !IsValue6 && !IsValue7 && !IsValue8 && !IsValue9 && !IsValue10 && !IsValue11 && !IsValue12 && !IsValue13 && !IsValue14 && !IsValue15 && !IsValue16 && !IsValue17 && !IsValue18 && !IsValue19 && !IsValue20 && !IsValue21 && !IsValue22 && !IsValue23 && !IsValue24 && IsValue25; + return IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && IsThreadMessageDelta && !IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && IsThreadMessageCompleted && !IsThreadMessageIncomplete || !IsError && !IsDone && !IsThreadCreated && !IsThreadRunCreated && !IsThreadRunQueued && !IsThreadRunInProgress && !IsThreadRunRequiresAction && !IsThreadRunCompleted && !IsThreadRunIncomplete && !IsThreadRunFailed && !IsThreadRunCancelling && !IsThreadRunCancelled && !IsThreadRunExpired && !IsThreadRunStepCreated && !IsThreadRunStepInProgress && !IsThreadRunStepDelta && !IsThreadRunStepCompleted && !IsThreadRunStepFailed && !IsThreadRunStepCancelled && !IsThreadRunStepExpired && !IsThreadMessageCreated && !IsThreadMessageInProgress && !IsThreadMessageDelta && !IsThreadMessageCompleted && IsThreadMessageIncomplete; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, - global::System.Func? value3 = null, - global::System.Func? value4 = null, - global::System.Func? value5 = null, - global::System.Func? value6 = null, - global::System.Func? value7 = null, - global::System.Func? value8 = null, - global::System.Func? value9 = null, - global::System.Func? value10 = null, - global::System.Func? value11 = null, - global::System.Func? value12 = null, - global::System.Func? value13 = null, - global::System.Func? value14 = null, - global::System.Func? value15 = null, - global::System.Func? value16 = null, - global::System.Func? value17 = null, - global::System.Func? value18 = null, - global::System.Func? value19 = null, - global::System.Func? value20 = null, - global::System.Func? value21 = null, - global::System.Func? value22 = null, - global::System.Func? value23 = null, - global::System.Func? value24 = null, - global::System.Func? value25 = null, + global::System.Func? error = null, + global::System.Func? done = null, + global::System.Func? threadCreated = null, + global::System.Func? threadRunCreated = null, + global::System.Func? threadRunQueued = null, + global::System.Func? threadRunInProgress = null, + global::System.Func? threadRunRequiresAction = null, + global::System.Func? threadRunCompleted = null, + global::System.Func? threadRunIncomplete = null, + global::System.Func? threadRunFailed = null, + global::System.Func? threadRunCancelling = null, + global::System.Func? threadRunCancelled = null, + global::System.Func? threadRunExpired = null, + global::System.Func? threadRunStepCreated = null, + global::System.Func? threadRunStepInProgress = null, + global::System.Func? threadRunStepDelta = null, + global::System.Func? threadRunStepCompleted = null, + global::System.Func? threadRunStepFailed = null, + global::System.Func? threadRunStepCancelled = null, + global::System.Func? threadRunStepExpired = null, + global::System.Func? threadMessageCreated = null, + global::System.Func? threadMessageInProgress = null, + global::System.Func? threadMessageDelta = null, + global::System.Func? threadMessageCompleted = null, + global::System.Func? threadMessageIncomplete = null, bool validate = true) { if (validate) @@ -1041,105 +1041,105 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsError && error != null) { - return value1(Value1!); + return error(Error!); } - else if (IsValue2 && value2 != null) + else if (IsDone && done != null) { - return value2(Value2!); + return done(Done!); } - else if (IsValue3 && value3 != null) + else if (IsThreadCreated && threadCreated != null) { - return value3(Value3!); + return threadCreated(ThreadCreated!); } - else if (IsValue4 && value4 != null) + else if (IsThreadRunCreated && threadRunCreated != null) { - return value4(Value4!); + return threadRunCreated(ThreadRunCreated!); } - else if (IsValue5 && value5 != null) + else if (IsThreadRunQueued && threadRunQueued != null) { - return value5(Value5!); + return threadRunQueued(ThreadRunQueued!); } - else if (IsValue6 && value6 != null) + else if (IsThreadRunInProgress && threadRunInProgress != null) { - return value6(Value6!); + return threadRunInProgress(ThreadRunInProgress!); } - else if (IsValue7 && value7 != null) + else if (IsThreadRunRequiresAction && threadRunRequiresAction != null) { - return value7(Value7!); + return threadRunRequiresAction(ThreadRunRequiresAction!); } - else if (IsValue8 && value8 != null) + else if (IsThreadRunCompleted && threadRunCompleted != null) { - return value8(Value8!); + return threadRunCompleted(ThreadRunCompleted!); } - else if (IsValue9 && value9 != null) + else if (IsThreadRunIncomplete && threadRunIncomplete != null) { - return value9(Value9!); + return threadRunIncomplete(ThreadRunIncomplete!); } - else if (IsValue10 && value10 != null) + else if (IsThreadRunFailed && threadRunFailed != null) { - return value10(Value10!); + return threadRunFailed(ThreadRunFailed!); } - else if (IsValue11 && value11 != null) + else if (IsThreadRunCancelling && threadRunCancelling != null) { - return value11(Value11!); + return threadRunCancelling(ThreadRunCancelling!); } - else if (IsValue12 && value12 != null) + else if (IsThreadRunCancelled && threadRunCancelled != null) { - return value12(Value12!); + return threadRunCancelled(ThreadRunCancelled!); } - else if (IsValue13 && value13 != null) + else if (IsThreadRunExpired && threadRunExpired != null) { - return value13(Value13!); + return threadRunExpired(ThreadRunExpired!); } - else if (IsValue14 && value14 != null) + else if (IsThreadRunStepCreated && threadRunStepCreated != null) { - return value14(Value14!); + return threadRunStepCreated(ThreadRunStepCreated!); } - else if (IsValue15 && value15 != null) + else if (IsThreadRunStepInProgress && threadRunStepInProgress != null) { - return value15(Value15!); + return threadRunStepInProgress(ThreadRunStepInProgress!); } - else if (IsValue16 && value16 != null) + else if (IsThreadRunStepDelta && threadRunStepDelta != null) { - return value16(Value16!); + return threadRunStepDelta(ThreadRunStepDelta!); } - else if (IsValue17 && value17 != null) + else if (IsThreadRunStepCompleted && threadRunStepCompleted != null) { - return value17(Value17!); + return threadRunStepCompleted(ThreadRunStepCompleted!); } - else if (IsValue18 && value18 != null) + else if (IsThreadRunStepFailed && threadRunStepFailed != null) { - return value18(Value18!); + return threadRunStepFailed(ThreadRunStepFailed!); } - else if (IsValue19 && value19 != null) + else if (IsThreadRunStepCancelled && threadRunStepCancelled != null) { - return value19(Value19!); + return threadRunStepCancelled(ThreadRunStepCancelled!); } - else if (IsValue20 && value20 != null) + else if (IsThreadRunStepExpired && threadRunStepExpired != null) { - return value20(Value20!); + return threadRunStepExpired(ThreadRunStepExpired!); } - else if (IsValue21 && value21 != null) + else if (IsThreadMessageCreated && threadMessageCreated != null) { - return value21(Value21!); + return threadMessageCreated(ThreadMessageCreated!); } - else if (IsValue22 && value22 != null) + else if (IsThreadMessageInProgress && threadMessageInProgress != null) { - return value22(Value22!); + return threadMessageInProgress(ThreadMessageInProgress!); } - else if (IsValue23 && value23 != null) + else if (IsThreadMessageDelta && threadMessageDelta != null) { - return value23(Value23!); + return threadMessageDelta(ThreadMessageDelta!); } - else if (IsValue24 && value24 != null) + else if (IsThreadMessageCompleted && threadMessageCompleted != null) { - return value24(Value24!); + return threadMessageCompleted(ThreadMessageCompleted!); } - else if (IsValue25 && value25 != null) + else if (IsThreadMessageIncomplete && threadMessageIncomplete != null) { - return value25(Value25!); + return threadMessageIncomplete(ThreadMessageIncomplete!); } return default(TResult); @@ -1149,31 +1149,31 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, - global::System.Action? value3 = null, - global::System.Action? value4 = null, - global::System.Action? value5 = null, - global::System.Action? value6 = null, - global::System.Action? value7 = null, - global::System.Action? value8 = null, - global::System.Action? value9 = null, - global::System.Action? value10 = null, - global::System.Action? value11 = null, - global::System.Action? value12 = null, - global::System.Action? value13 = null, - global::System.Action? value14 = null, - global::System.Action? value15 = null, - global::System.Action? value16 = null, - global::System.Action? value17 = null, - global::System.Action? value18 = null, - global::System.Action? value19 = null, - global::System.Action? value20 = null, - global::System.Action? value21 = null, - global::System.Action? value22 = null, - global::System.Action? value23 = null, - global::System.Action? value24 = null, - global::System.Action? value25 = null, + global::System.Action? error = null, + global::System.Action? done = null, + global::System.Action? threadCreated = null, + global::System.Action? threadRunCreated = null, + global::System.Action? threadRunQueued = null, + global::System.Action? threadRunInProgress = null, + global::System.Action? threadRunRequiresAction = null, + global::System.Action? threadRunCompleted = null, + global::System.Action? threadRunIncomplete = null, + global::System.Action? threadRunFailed = null, + global::System.Action? threadRunCancelling = null, + global::System.Action? threadRunCancelled = null, + global::System.Action? threadRunExpired = null, + global::System.Action? threadRunStepCreated = null, + global::System.Action? threadRunStepInProgress = null, + global::System.Action? threadRunStepDelta = null, + global::System.Action? threadRunStepCompleted = null, + global::System.Action? threadRunStepFailed = null, + global::System.Action? threadRunStepCancelled = null, + global::System.Action? threadRunStepExpired = null, + global::System.Action? threadMessageCreated = null, + global::System.Action? threadMessageInProgress = null, + global::System.Action? threadMessageDelta = null, + global::System.Action? threadMessageCompleted = null, + global::System.Action? threadMessageIncomplete = null, bool validate = true) { if (validate) @@ -1181,105 +1181,105 @@ public void Match( Validate(); } - if (IsValue1) + if (IsError) { - value1?.Invoke(Value1!); + error?.Invoke(Error!); } - else if (IsValue2) + else if (IsDone) { - value2?.Invoke(Value2!); + done?.Invoke(Done!); } - else if (IsValue3) + else if (IsThreadCreated) { - value3?.Invoke(Value3!); + threadCreated?.Invoke(ThreadCreated!); } - else if (IsValue4) + else if (IsThreadRunCreated) { - value4?.Invoke(Value4!); + threadRunCreated?.Invoke(ThreadRunCreated!); } - else if (IsValue5) + else if (IsThreadRunQueued) { - value5?.Invoke(Value5!); + threadRunQueued?.Invoke(ThreadRunQueued!); } - else if (IsValue6) + else if (IsThreadRunInProgress) { - value6?.Invoke(Value6!); + threadRunInProgress?.Invoke(ThreadRunInProgress!); } - else if (IsValue7) + else if (IsThreadRunRequiresAction) { - value7?.Invoke(Value7!); + threadRunRequiresAction?.Invoke(ThreadRunRequiresAction!); } - else if (IsValue8) + else if (IsThreadRunCompleted) { - value8?.Invoke(Value8!); + threadRunCompleted?.Invoke(ThreadRunCompleted!); } - else if (IsValue9) + else if (IsThreadRunIncomplete) { - value9?.Invoke(Value9!); + threadRunIncomplete?.Invoke(ThreadRunIncomplete!); } - else if (IsValue10) + else if (IsThreadRunFailed) { - value10?.Invoke(Value10!); + threadRunFailed?.Invoke(ThreadRunFailed!); } - else if (IsValue11) + else if (IsThreadRunCancelling) { - value11?.Invoke(Value11!); + threadRunCancelling?.Invoke(ThreadRunCancelling!); } - else if (IsValue12) + else if (IsThreadRunCancelled) { - value12?.Invoke(Value12!); + threadRunCancelled?.Invoke(ThreadRunCancelled!); } - else if (IsValue13) + else if (IsThreadRunExpired) { - value13?.Invoke(Value13!); + threadRunExpired?.Invoke(ThreadRunExpired!); } - else if (IsValue14) + else if (IsThreadRunStepCreated) { - value14?.Invoke(Value14!); + threadRunStepCreated?.Invoke(ThreadRunStepCreated!); } - else if (IsValue15) + else if (IsThreadRunStepInProgress) { - value15?.Invoke(Value15!); + threadRunStepInProgress?.Invoke(ThreadRunStepInProgress!); } - else if (IsValue16) + else if (IsThreadRunStepDelta) { - value16?.Invoke(Value16!); + threadRunStepDelta?.Invoke(ThreadRunStepDelta!); } - else if (IsValue17) + else if (IsThreadRunStepCompleted) { - value17?.Invoke(Value17!); + threadRunStepCompleted?.Invoke(ThreadRunStepCompleted!); } - else if (IsValue18) + else if (IsThreadRunStepFailed) { - value18?.Invoke(Value18!); + threadRunStepFailed?.Invoke(ThreadRunStepFailed!); } - else if (IsValue19) + else if (IsThreadRunStepCancelled) { - value19?.Invoke(Value19!); + threadRunStepCancelled?.Invoke(ThreadRunStepCancelled!); } - else if (IsValue20) + else if (IsThreadRunStepExpired) { - value20?.Invoke(Value20!); + threadRunStepExpired?.Invoke(ThreadRunStepExpired!); } - else if (IsValue21) + else if (IsThreadMessageCreated) { - value21?.Invoke(Value21!); + threadMessageCreated?.Invoke(ThreadMessageCreated!); } - else if (IsValue22) + else if (IsThreadMessageInProgress) { - value22?.Invoke(Value22!); + threadMessageInProgress?.Invoke(ThreadMessageInProgress!); } - else if (IsValue23) + else if (IsThreadMessageDelta) { - value23?.Invoke(Value23!); + threadMessageDelta?.Invoke(ThreadMessageDelta!); } - else if (IsValue24) + else if (IsThreadMessageCompleted) { - value24?.Invoke(Value24!); + threadMessageCompleted?.Invoke(ThreadMessageCompleted!); } - else if (IsValue25) + else if (IsThreadMessageIncomplete) { - value25?.Invoke(Value25!); + threadMessageIncomplete?.Invoke(ThreadMessageIncomplete!); } } @@ -1290,55 +1290,55 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Error, typeof(global::G.ErrorEvent), - Value2, + Done, typeof(global::G.DoneEvent), - Value3, + ThreadCreated, typeof(global::G.AssistantStreamEventVariant3), - Value4, + ThreadRunCreated, typeof(global::G.AssistantStreamEventVariant4), - Value5, + ThreadRunQueued, typeof(global::G.AssistantStreamEventVariant5), - Value6, + ThreadRunInProgress, typeof(global::G.AssistantStreamEventVariant6), - Value7, + ThreadRunRequiresAction, typeof(global::G.AssistantStreamEventVariant7), - Value8, + ThreadRunCompleted, typeof(global::G.AssistantStreamEventVariant8), - Value9, + ThreadRunIncomplete, typeof(global::G.AssistantStreamEventVariant9), - Value10, + ThreadRunFailed, typeof(global::G.AssistantStreamEventVariant10), - Value11, + ThreadRunCancelling, typeof(global::G.AssistantStreamEventVariant11), - Value12, + ThreadRunCancelled, typeof(global::G.AssistantStreamEventVariant12), - Value13, + ThreadRunExpired, typeof(global::G.AssistantStreamEventVariant13), - Value14, + ThreadRunStepCreated, typeof(global::G.AssistantStreamEventVariant14), - Value15, + ThreadRunStepInProgress, typeof(global::G.AssistantStreamEventVariant15), - Value16, + ThreadRunStepDelta, typeof(global::G.AssistantStreamEventVariant16), - Value17, + ThreadRunStepCompleted, typeof(global::G.AssistantStreamEventVariant17), - Value18, + ThreadRunStepFailed, typeof(global::G.AssistantStreamEventVariant18), - Value19, + ThreadRunStepCancelled, typeof(global::G.AssistantStreamEventVariant19), - Value20, + ThreadRunStepExpired, typeof(global::G.AssistantStreamEventVariant20), - Value21, + ThreadMessageCreated, typeof(global::G.AssistantStreamEventVariant21), - Value22, + ThreadMessageInProgress, typeof(global::G.AssistantStreamEventVariant22), - Value23, + ThreadMessageDelta, typeof(global::G.AssistantStreamEventVariant23), - Value24, + ThreadMessageCompleted, typeof(global::G.AssistantStreamEventVariant24), - Value25, + ThreadMessageIncomplete, typeof(global::G.AssistantStreamEventVariant25), }; const int offset = unchecked((int)2166136261); @@ -1355,31 +1355,31 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(AssistantStreamEvent 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(Value3, other.Value3) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value4, other.Value4) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value5, other.Value5) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value6, other.Value6) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value7, other.Value7) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value8, other.Value8) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value9, other.Value9) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value10, other.Value10) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value11, other.Value11) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value12, other.Value12) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value13, other.Value13) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value14, other.Value14) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value15, other.Value15) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value16, other.Value16) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value17, other.Value17) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value18, other.Value18) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value19, other.Value19) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value20, other.Value20) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value21, other.Value21) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value22, other.Value22) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value23, other.Value23) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value24, other.Value24) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value25, other.Value25) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Done, other.Done) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadCreated, other.ThreadCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCreated, other.ThreadRunCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunQueued, other.ThreadRunQueued) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunInProgress, other.ThreadRunInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunRequiresAction, other.ThreadRunRequiresAction) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCompleted, other.ThreadRunCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunIncomplete, other.ThreadRunIncomplete) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunFailed, other.ThreadRunFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCancelling, other.ThreadRunCancelling) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunCancelled, other.ThreadRunCancelled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunExpired, other.ThreadRunExpired) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCreated, other.ThreadRunStepCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepInProgress, other.ThreadRunStepInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepDelta, other.ThreadRunStepDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCompleted, other.ThreadRunStepCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepFailed, other.ThreadRunStepFailed) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepCancelled, other.ThreadRunStepCancelled) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadRunStepExpired, other.ThreadRunStepExpired) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageCreated, other.ThreadMessageCreated) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageInProgress, other.ThreadMessageInProgress) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageDelta, other.ThreadMessageDelta) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageCompleted, other.ThreadMessageCompleted) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ThreadMessageIncomplete, other.ThreadMessageIncomplete) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs index 895c90d464..f22979918e 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ChatCompletionRequestUserMessageContentPart.g.verified.cs @@ -55,18 +55,18 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque /// /// #if NET6_0_OR_GREATER - public global::G.ChatCompletionRequestMessageContentPartImage? Image { get; init; } + public global::G.ChatCompletionRequestMessageContentPartImage? ImageUrl { get; init; } #else - public global::G.ChatCompletionRequestMessageContentPartImage? Image { get; } + public global::G.ChatCompletionRequestMessageContentPartImage? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Image))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsImage => Image != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,14 +76,14 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque /// /// /// - public static implicit operator global::G.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.Image; + public static implicit operator global::G.ChatCompletionRequestMessageContentPartImage?(ChatCompletionRequestUserMessageContentPart @this) => @this.ImageUrl; /// /// /// public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionRequestMessageContentPartImage? value) { - Image = value; + ImageUrl = value; } /// @@ -92,20 +92,20 @@ public ChatCompletionRequestUserMessageContentPart(global::G.ChatCompletionReque public ChatCompletionRequestUserMessageContentPart( global::G.ChatCompletionRequestUserMessageContentPartDiscriminatorType? type, global::G.ChatCompletionRequestMessageContentPartText? text, - global::G.ChatCompletionRequestMessageContentPartImage? image + global::G.ChatCompletionRequestMessageContentPartImage? imageUrl ) { Type = type; Text = text; - Image = image; + ImageUrl = imageUrl; } /// /// /// public object? Object => - Image as object ?? + ImageUrl as object ?? Text as object ; @@ -114,7 +114,7 @@ Text as object /// public bool Validate() { - return IsText && !IsImage || !IsText && IsImage; + return IsText && !IsImageUrl || !IsText && IsImageUrl; } /// @@ -122,7 +122,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? image = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -134,9 +134,9 @@ public bool Validate() { return text(Text!); } - else if (IsImage && image != null) + else if (IsImageUrl && imageUrl != null) { - return image(Image!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -147,7 +147,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? image = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -159,9 +159,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsImage) + else if (IsImageUrl) { - image?.Invoke(Image!); + imageUrl?.Invoke(ImageUrl!); } } @@ -174,7 +174,7 @@ public override int GetHashCode() { Text, typeof(global::G.ChatCompletionRequestMessageContentPartText), - Image, + ImageUrl, typeof(global::G.ChatCompletionRequestMessageContentPartImage), }; const int offset = unchecked((int)2166136261); @@ -192,7 +192,7 @@ public bool Equals(ChatCompletionRequestUserMessageContentPart other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Image, other.Image) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem.g.verified.cs index e33fe6a99c..a991f67905 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; init; } + public global::G.MessageContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; } + public global::G.MessageContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageImageFileObject => MessageImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentImageFileObject?(ContentItem @this) => @this.MessageImageFileObject; + public static implicit operator global::G.MessageContentImageFileObject?(ContentItem @this) => @this.ImageFile; /// /// /// public ContentItem(global::G.MessageContentImageFileObject? value) { - MessageImageFileObject = value; + ImageFile = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,32 +76,32 @@ public ContentItem(global::G.MessageContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageContentImageUrlObject?(ContentItem @this) => @this.MessageImageUrlObject; + public static implicit operator global::G.MessageContentImageUrlObject?(ContentItem @this) => @this.ImageUrl; /// /// /// public ContentItem(global::G.MessageContentImageUrlObject? value) { - MessageImageUrlObject = value; + ImageUrl = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentTextObject? MessageTextObject { get; init; } + public global::G.MessageContentTextObject? Text { get; init; } #else - public global::G.MessageContentTextObject? MessageTextObject { get; } + public global::G.MessageContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageTextObject => MessageTextObject != null; + public bool IsText => Text != null; /// /// @@ -111,32 +111,32 @@ public ContentItem(global::G.MessageContentImageUrlObject? value) /// /// /// - public static implicit operator global::G.MessageContentTextObject?(ContentItem @this) => @this.MessageTextObject; + public static implicit operator global::G.MessageContentTextObject?(ContentItem @this) => @this.Text; /// /// /// public ContentItem(global::G.MessageContentTextObject? value) { - MessageTextObject = value; + Text = value; } /// /// The refusal content generated by the assistant. /// #if NET6_0_OR_GREATER - public global::G.MessageContentRefusalObject? MessageRefusalObject { get; init; } + public global::G.MessageContentRefusalObject? Refusal { get; init; } #else - public global::G.MessageContentRefusalObject? MessageRefusalObject { get; } + public global::G.MessageContentRefusalObject? Refusal { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRefusalObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] #endif - public bool IsMessageRefusalObject => MessageRefusalObject != null; + public bool IsRefusal => Refusal != null; /// /// @@ -146,14 +146,14 @@ public ContentItem(global::G.MessageContentTextObject? value) /// /// /// - public static implicit operator global::G.MessageContentRefusalObject?(ContentItem @this) => @this.MessageRefusalObject; + public static implicit operator global::G.MessageContentRefusalObject?(ContentItem @this) => @this.Refusal; /// /// /// public ContentItem(global::G.MessageContentRefusalObject? value) { - MessageRefusalObject = value; + Refusal = value; } /// @@ -161,28 +161,28 @@ public ContentItem(global::G.MessageContentRefusalObject? value) /// public ContentItem( global::G.MessageObjectContentItemDiscriminatorType? type, - global::G.MessageContentImageFileObject? messageImageFileObject, - global::G.MessageContentImageUrlObject? messageImageUrlObject, - global::G.MessageContentTextObject? messageTextObject, - global::G.MessageContentRefusalObject? messageRefusalObject + global::G.MessageContentImageFileObject? imageFile, + global::G.MessageContentImageUrlObject? imageUrl, + global::G.MessageContentTextObject? text, + global::G.MessageContentRefusalObject? refusal ) { Type = type; - MessageImageFileObject = messageImageFileObject; - MessageImageUrlObject = messageImageUrlObject; - MessageTextObject = messageTextObject; - MessageRefusalObject = messageRefusalObject; + ImageFile = imageFile; + ImageUrl = imageUrl; + Text = text; + Refusal = refusal; } /// /// /// public object? Object => - MessageRefusalObject as object ?? - MessageTextObject as object ?? - MessageImageUrlObject as object ?? - MessageImageFileObject as object + Refusal as object ?? + Text as object ?? + ImageUrl as object ?? + ImageFile as object ; /// @@ -190,17 +190,17 @@ MessageImageFileObject as object /// public bool Validate() { - return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageTextObject && !IsMessageRefusalObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageTextObject && IsMessageRefusalObject; + return IsImageFile && !IsImageUrl && !IsText && !IsRefusal || !IsImageFile && IsImageUrl && !IsText && !IsRefusal || !IsImageFile && !IsImageUrl && IsText && !IsRefusal || !IsImageFile && !IsImageUrl && !IsText && IsRefusal; } /// /// /// public TResult? Match( - global::System.Func? messageImageFileObject = null, - global::System.Func? messageImageUrlObject = null, - global::System.Func? messageTextObject = null, - global::System.Func? messageRefusalObject = null, + global::System.Func? imageFile = null, + global::System.Func? imageUrl = null, + global::System.Func? text = null, + global::System.Func? refusal = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsMessageImageFileObject && messageImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageImageFileObject(MessageImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageImageUrlObject && messageImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageImageUrlObject(MessageImageUrlObject!); + return imageUrl(ImageUrl!); } - else if (IsMessageTextObject && messageTextObject != null) + else if (IsText && text != null) { - return messageTextObject(MessageTextObject!); + return text(Text!); } - else if (IsMessageRefusalObject && messageRefusalObject != null) + else if (IsRefusal && refusal != null) { - return messageRefusalObject(MessageRefusalObject!); + return refusal(Refusal!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageImageFileObject = null, - global::System.Action? messageImageUrlObject = null, - global::System.Action? messageTextObject = null, - global::System.Action? messageRefusalObject = null, + global::System.Action? imageFile = null, + global::System.Action? imageUrl = null, + global::System.Action? text = null, + global::System.Action? refusal = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsMessageImageFileObject) + if (IsImageFile) { - messageImageFileObject?.Invoke(MessageImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageImageUrlObject) + else if (IsImageUrl) { - messageImageUrlObject?.Invoke(MessageImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } - else if (IsMessageTextObject) + else if (IsText) { - messageTextObject?.Invoke(MessageTextObject!); + text?.Invoke(Text!); } - else if (IsMessageRefusalObject) + else if (IsRefusal) { - messageRefusalObject?.Invoke(MessageRefusalObject!); + refusal?.Invoke(Refusal!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - MessageImageFileObject, + ImageFile, typeof(global::G.MessageContentImageFileObject), - MessageImageUrlObject, + ImageUrl, typeof(global::G.MessageContentImageUrlObject), - MessageTextObject, + Text, typeof(global::G.MessageContentTextObject), - MessageRefusalObject, + Refusal, typeof(global::G.MessageContentRefusalObject), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageTextObject, other.MessageTextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRefusalObject, other.MessageRefusalObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem2.g.verified.cs index 887687ce1d..3fd8a32489 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; init; } + public global::G.MessageDeltaContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageDeltaContentImageFileObject? MessageDeltaImageFileObject { get; } + public global::G.MessageDeltaContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageDeltaImageFileObject => MessageDeltaImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageDeltaContentImageFileObject?(ContentItem2 @this) => @this.MessageDeltaImageFileObject; + public static implicit operator global::G.MessageDeltaContentImageFileObject?(ContentItem2 @this) => @this.ImageFile; /// /// /// public ContentItem2(global::G.MessageDeltaContentImageFileObject? value) { - MessageDeltaImageFileObject = value; + ImageFile = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentTextObject? MessageDeltaTextObject { get; init; } + public global::G.MessageDeltaContentTextObject? Text { get; init; } #else - public global::G.MessageDeltaContentTextObject? MessageDeltaTextObject { get; } + public global::G.MessageDeltaContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageDeltaTextObject => MessageDeltaTextObject != null; + public bool IsText => Text != null; /// /// @@ -76,32 +76,32 @@ public ContentItem2(global::G.MessageDeltaContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentTextObject?(ContentItem2 @this) => @this.MessageDeltaTextObject; + public static implicit operator global::G.MessageDeltaContentTextObject?(ContentItem2 @this) => @this.Text; /// /// /// public ContentItem2(global::G.MessageDeltaContentTextObject? value) { - MessageDeltaTextObject = value; + Text = value; } /// /// The refusal content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; init; } + public global::G.MessageDeltaContentRefusalObject? Refusal { get; init; } #else - public global::G.MessageDeltaContentRefusalObject? MessageDeltaRefusalObject { get; } + public global::G.MessageDeltaContentRefusalObject? Refusal { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaRefusalObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Refusal))] #endif - public bool IsMessageDeltaRefusalObject => MessageDeltaRefusalObject != null; + public bool IsRefusal => Refusal != null; /// /// @@ -111,32 +111,32 @@ public ContentItem2(global::G.MessageDeltaContentTextObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentRefusalObject?(ContentItem2 @this) => @this.MessageDeltaRefusalObject; + public static implicit operator global::G.MessageDeltaContentRefusalObject?(ContentItem2 @this) => @this.Refusal; /// /// /// public ContentItem2(global::G.MessageDeltaContentRefusalObject? value) { - MessageDeltaRefusalObject = value; + Refusal = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; init; } + public global::G.MessageDeltaContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageDeltaContentImageUrlObject? MessageDeltaImageUrlObject { get; } + public global::G.MessageDeltaContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDeltaImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageDeltaImageUrlObject => MessageDeltaImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -146,14 +146,14 @@ public ContentItem2(global::G.MessageDeltaContentRefusalObject? value) /// /// /// - public static implicit operator global::G.MessageDeltaContentImageUrlObject?(ContentItem2 @this) => @this.MessageDeltaImageUrlObject; + public static implicit operator global::G.MessageDeltaContentImageUrlObject?(ContentItem2 @this) => @this.ImageUrl; /// /// /// public ContentItem2(global::G.MessageDeltaContentImageUrlObject? value) { - MessageDeltaImageUrlObject = value; + ImageUrl = value; } /// @@ -161,28 +161,28 @@ public ContentItem2(global::G.MessageDeltaContentImageUrlObject? value) /// public ContentItem2( global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType? type, - global::G.MessageDeltaContentImageFileObject? messageDeltaImageFileObject, - global::G.MessageDeltaContentTextObject? messageDeltaTextObject, - global::G.MessageDeltaContentRefusalObject? messageDeltaRefusalObject, - global::G.MessageDeltaContentImageUrlObject? messageDeltaImageUrlObject + global::G.MessageDeltaContentImageFileObject? imageFile, + global::G.MessageDeltaContentTextObject? text, + global::G.MessageDeltaContentRefusalObject? refusal, + global::G.MessageDeltaContentImageUrlObject? imageUrl ) { Type = type; - MessageDeltaImageFileObject = messageDeltaImageFileObject; - MessageDeltaTextObject = messageDeltaTextObject; - MessageDeltaRefusalObject = messageDeltaRefusalObject; - MessageDeltaImageUrlObject = messageDeltaImageUrlObject; + ImageFile = imageFile; + Text = text; + Refusal = refusal; + ImageUrl = imageUrl; } /// /// /// public object? Object => - MessageDeltaImageUrlObject as object ?? - MessageDeltaRefusalObject as object ?? - MessageDeltaTextObject as object ?? - MessageDeltaImageFileObject as object + ImageUrl as object ?? + Refusal as object ?? + Text as object ?? + ImageFile as object ; /// @@ -190,17 +190,17 @@ MessageDeltaImageFileObject as object /// public bool Validate() { - return IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && IsMessageDeltaRefusalObject && !IsMessageDeltaImageUrlObject || !IsMessageDeltaImageFileObject && !IsMessageDeltaTextObject && !IsMessageDeltaRefusalObject && IsMessageDeltaImageUrlObject; + return IsImageFile && !IsText && !IsRefusal && !IsImageUrl || !IsImageFile && IsText && !IsRefusal && !IsImageUrl || !IsImageFile && !IsText && IsRefusal && !IsImageUrl || !IsImageFile && !IsText && !IsRefusal && IsImageUrl; } /// /// /// public TResult? Match( - global::System.Func? messageDeltaImageFileObject = null, - global::System.Func? messageDeltaTextObject = null, - global::System.Func? messageDeltaRefusalObject = null, - global::System.Func? messageDeltaImageUrlObject = null, + global::System.Func? imageFile = null, + global::System.Func? text = null, + global::System.Func? refusal = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsMessageDeltaImageFileObject && messageDeltaImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageDeltaImageFileObject(MessageDeltaImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageDeltaTextObject && messageDeltaTextObject != null) + else if (IsText && text != null) { - return messageDeltaTextObject(MessageDeltaTextObject!); + return text(Text!); } - else if (IsMessageDeltaRefusalObject && messageDeltaRefusalObject != null) + else if (IsRefusal && refusal != null) { - return messageDeltaRefusalObject(MessageDeltaRefusalObject!); + return refusal(Refusal!); } - else if (IsMessageDeltaImageUrlObject && messageDeltaImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageDeltaImageUrlObject(MessageDeltaImageUrlObject!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageDeltaImageFileObject = null, - global::System.Action? messageDeltaTextObject = null, - global::System.Action? messageDeltaRefusalObject = null, - global::System.Action? messageDeltaImageUrlObject = null, + global::System.Action? imageFile = null, + global::System.Action? text = null, + global::System.Action? refusal = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsMessageDeltaImageFileObject) + if (IsImageFile) { - messageDeltaImageFileObject?.Invoke(MessageDeltaImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageDeltaTextObject) + else if (IsText) { - messageDeltaTextObject?.Invoke(MessageDeltaTextObject!); + text?.Invoke(Text!); } - else if (IsMessageDeltaRefusalObject) + else if (IsRefusal) { - messageDeltaRefusalObject?.Invoke(MessageDeltaRefusalObject!); + refusal?.Invoke(Refusal!); } - else if (IsMessageDeltaImageUrlObject) + else if (IsImageUrl) { - messageDeltaImageUrlObject?.Invoke(MessageDeltaImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - MessageDeltaImageFileObject, + ImageFile, typeof(global::G.MessageDeltaContentImageFileObject), - MessageDeltaTextObject, + Text, typeof(global::G.MessageDeltaContentTextObject), - MessageDeltaRefusalObject, + Refusal, typeof(global::G.MessageDeltaContentRefusalObject), - MessageDeltaImageUrlObject, + ImageUrl, typeof(global::G.MessageDeltaContentImageUrlObject), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageFileObject, other.MessageDeltaImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaTextObject, other.MessageDeltaTextObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaRefusalObject, other.MessageDeltaRefusalObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDeltaImageUrlObject, other.MessageDeltaImageUrlObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Refusal, other.Refusal) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentVariant2Item.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentVariant2Item.g.verified.cs index 89faba6971..c9628add6d 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentVariant2Item.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ContentVariant2Item.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// References an image [File](/docs/api-reference/files) in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; init; } + public global::G.MessageContentImageFileObject? ImageFile { get; init; } #else - public global::G.MessageContentImageFileObject? MessageImageFileObject { get; } + public global::G.MessageContentImageFileObject? ImageFile { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageFileObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageFile))] #endif - public bool IsMessageImageFileObject => MessageImageFileObject != null; + public bool IsImageFile => ImageFile != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.MessageImageFileObject; + public static implicit operator global::G.MessageContentImageFileObject?(ContentVariant2Item @this) => @this.ImageFile; /// /// /// public ContentVariant2Item(global::G.MessageContentImageFileObject? value) { - MessageImageFileObject = value; + ImageFile = value; } /// /// References an image URL in the content of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; init; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; init; } #else - public global::G.MessageContentImageUrlObject? MessageImageUrlObject { get; } + public global::G.MessageContentImageUrlObject? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageImageUrlObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsMessageImageUrlObject => MessageImageUrlObject != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,32 +76,32 @@ public ContentVariant2Item(global::G.MessageContentImageFileObject? value) /// /// /// - public static implicit operator global::G.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.MessageImageUrlObject; + public static implicit operator global::G.MessageContentImageUrlObject?(ContentVariant2Item @this) => @this.ImageUrl; /// /// /// public ContentVariant2Item(global::G.MessageContentImageUrlObject? value) { - MessageImageUrlObject = value; + ImageUrl = value; } /// /// The text content that is part of a message. /// #if NET6_0_OR_GREATER - public global::G.MessageRequestContentTextObject? MessageRequestTextObject { get; init; } + public global::G.MessageRequestContentTextObject? Text { get; init; } #else - public global::G.MessageRequestContentTextObject? MessageRequestTextObject { get; } + public global::G.MessageRequestContentTextObject? Text { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageRequestTextObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))] #endif - public bool IsMessageRequestTextObject => MessageRequestTextObject != null; + public bool IsText => Text != null; /// /// @@ -111,14 +111,14 @@ public ContentVariant2Item(global::G.MessageContentImageUrlObject? value) /// /// /// - public static implicit operator global::G.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.MessageRequestTextObject; + public static implicit operator global::G.MessageRequestContentTextObject?(ContentVariant2Item @this) => @this.Text; /// /// /// public ContentVariant2Item(global::G.MessageRequestContentTextObject? value) { - MessageRequestTextObject = value; + Text = value; } /// @@ -126,25 +126,25 @@ public ContentVariant2Item(global::G.MessageRequestContentTextObject? value) /// public ContentVariant2Item( global::G.CreateMessageRequestContentVariant2ItemDiscriminatorType? type, - global::G.MessageContentImageFileObject? messageImageFileObject, - global::G.MessageContentImageUrlObject? messageImageUrlObject, - global::G.MessageRequestContentTextObject? messageRequestTextObject + global::G.MessageContentImageFileObject? imageFile, + global::G.MessageContentImageUrlObject? imageUrl, + global::G.MessageRequestContentTextObject? text ) { Type = type; - MessageImageFileObject = messageImageFileObject; - MessageImageUrlObject = messageImageUrlObject; - MessageRequestTextObject = messageRequestTextObject; + ImageFile = imageFile; + ImageUrl = imageUrl; + Text = text; } /// /// /// public object? Object => - MessageRequestTextObject as object ?? - MessageImageUrlObject as object ?? - MessageImageFileObject as object + Text as object ?? + ImageUrl as object ?? + ImageFile as object ; /// @@ -152,16 +152,16 @@ MessageImageFileObject as object /// public bool Validate() { - return IsMessageImageFileObject && !IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && IsMessageImageUrlObject && !IsMessageRequestTextObject || !IsMessageImageFileObject && !IsMessageImageUrlObject && IsMessageRequestTextObject; + return IsImageFile && !IsImageUrl && !IsText || !IsImageFile && IsImageUrl && !IsText || !IsImageFile && !IsImageUrl && IsText; } /// /// /// public TResult? Match( - global::System.Func? messageImageFileObject = null, - global::System.Func? messageImageUrlObject = null, - global::System.Func? messageRequestTextObject = null, + global::System.Func? imageFile = null, + global::System.Func? imageUrl = null, + global::System.Func? text = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsMessageImageFileObject && messageImageFileObject != null) + if (IsImageFile && imageFile != null) { - return messageImageFileObject(MessageImageFileObject!); + return imageFile(ImageFile!); } - else if (IsMessageImageUrlObject && messageImageUrlObject != null) + else if (IsImageUrl && imageUrl != null) { - return messageImageUrlObject(MessageImageUrlObject!); + return imageUrl(ImageUrl!); } - else if (IsMessageRequestTextObject && messageRequestTextObject != null) + else if (IsText && text != null) { - return messageRequestTextObject(MessageRequestTextObject!); + return text(Text!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? messageImageFileObject = null, - global::System.Action? messageImageUrlObject = null, - global::System.Action? messageRequestTextObject = null, + global::System.Action? imageFile = null, + global::System.Action? imageUrl = null, + global::System.Action? text = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsMessageImageFileObject) + if (IsImageFile) { - messageImageFileObject?.Invoke(MessageImageFileObject!); + imageFile?.Invoke(ImageFile!); } - else if (IsMessageImageUrlObject) + else if (IsImageUrl) { - messageImageUrlObject?.Invoke(MessageImageUrlObject!); + imageUrl?.Invoke(ImageUrl!); } - else if (IsMessageRequestTextObject) + else if (IsText) { - messageRequestTextObject?.Invoke(MessageRequestTextObject!); + text?.Invoke(Text!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - MessageImageFileObject, + ImageFile, typeof(global::G.MessageContentImageFileObject), - MessageImageUrlObject, + ImageUrl, typeof(global::G.MessageContentImageUrlObject), - MessageRequestTextObject, + Text, typeof(global::G.MessageRequestContentTextObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ContentVariant2Item other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageFileObject, other.MessageImageFileObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageImageUrlObject, other.MessageImageUrlObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageRequestTextObject, other.MessageRequestTextObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageFile, other.ImageFile) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index 869b714c47..802905ced2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; init; } #else - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsValue1 => Value1 != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Auto; /// /// /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) { - Value1 = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; init; } #else - public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } + public global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsValue2 => Value2 != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( /// /// /// - public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + public static implicit operator global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Static; /// /// /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) { - Value2 = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( /// public CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto, + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static ) { Type = type; - Value1 = value1; - Value2 = value2; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsAuto && auto != null) { - return value1(Value1!); + return auto(Auto!); } - else if (IsValue2 && value2 != null) + else if (IsStatic && @static != null) { - return value2(Value2!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsAuto) { - value1?.Invoke(Value1!); + auto?.Invoke(Auto!); } - else if (IsValue2) + else if (IsStatic) { - value2?.Invoke(Value2!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Auto, typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, + Static, typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy 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(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index 53dec3bca3..992913100b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; init; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; init; } #else - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Value1 { get; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value1))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsValue1 => Value1 != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value1; + public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Auto; /// /// /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value) { - Value1 = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; init; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; init; } #else - public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Value2 { get; } + public global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsValue2 => Value2 != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(glo /// /// /// - public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Value2; + public static implicit operator global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2?(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy @this) => @this.Static; /// /// /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value) { - Value2 = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy(glo /// public CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? type, - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1, - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto, + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static ) { Type = type; - Value1 = value1; - Value2 = value2; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - Value2 as object ?? - Value1 as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ Value1 as object /// public bool Validate() { - return IsValue1 && !IsValue2 || !IsValue1 && IsValue2; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? value1 = null, - global::System.Func? value2 = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsValue1 && value1 != null) + if (IsAuto && auto != null) { - return value1(Value1!); + return auto(Auto!); } - else if (IsValue2 && value2 != null) + else if (IsStatic && @static != null) { - return value2(Value2!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? value1 = null, - global::System.Action? value2 = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsValue1) + if (IsAuto) { - value1?.Invoke(Value1!); + auto?.Invoke(Auto!); } - else if (IsValue2) + else if (IsStatic) { - value2?.Invoke(Value2!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - Value1, + Auto, typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), - Value2, + Static, typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy 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(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs index c2ce14d1c8..97f80c1a76 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.CreateVectorStoreRequestChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. /// #if NET6_0_OR_GREATER - public global::G.AutoChunkingStrategyRequestParam? AutoParam { get; init; } + public global::G.AutoChunkingStrategyRequestParam? Auto { get; init; } #else - public global::G.AutoChunkingStrategyRequestParam? AutoParam { get; } + public global::G.AutoChunkingStrategyRequestParam? Auto { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AutoParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Auto))] #endif - public bool IsAutoParam => AutoParam != null; + public bool IsAuto => Auto != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AutoChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.AutoParam; + public static implicit operator global::G.AutoChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.Auto; /// /// /// public CreateVectorStoreRequestChunkingStrategy(global::G.AutoChunkingStrategyRequestParam? value) { - AutoParam = value; + Auto = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.StaticChunkingStrategyRequestParam? StaticParam { get; init; } + public global::G.StaticChunkingStrategyRequestParam? Static { get; init; } #else - public global::G.StaticChunkingStrategyRequestParam? StaticParam { get; } + public global::G.StaticChunkingStrategyRequestParam? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsStaticParam => StaticParam != null; + public bool IsStatic => Static != null; /// /// @@ -76,14 +76,14 @@ public CreateVectorStoreRequestChunkingStrategy(global::G.AutoChunkingStrategyRe /// /// /// - public static implicit operator global::G.StaticChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.StaticParam; + public static implicit operator global::G.StaticChunkingStrategyRequestParam?(CreateVectorStoreRequestChunkingStrategy @this) => @this.Static; /// /// /// public CreateVectorStoreRequestChunkingStrategy(global::G.StaticChunkingStrategyRequestParam? value) { - StaticParam = value; + Static = value; } /// @@ -91,22 +91,22 @@ public CreateVectorStoreRequestChunkingStrategy(global::G.StaticChunkingStrategy /// public CreateVectorStoreRequestChunkingStrategy( global::G.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? type, - global::G.AutoChunkingStrategyRequestParam? autoParam, - global::G.StaticChunkingStrategyRequestParam? staticParam + global::G.AutoChunkingStrategyRequestParam? auto, + global::G.StaticChunkingStrategyRequestParam? @static ) { Type = type; - AutoParam = autoParam; - StaticParam = staticParam; + Auto = auto; + Static = @static; } /// /// /// public object? Object => - StaticParam as object ?? - AutoParam as object + Static as object ?? + Auto as object ; /// @@ -114,15 +114,15 @@ AutoParam as object /// public bool Validate() { - return IsAutoParam && !IsStaticParam || !IsAutoParam && IsStaticParam; + return IsAuto && !IsStatic || !IsAuto && IsStatic; } /// /// /// public TResult? Match( - global::System.Func? autoParam = null, - global::System.Func? staticParam = null, + global::System.Func? auto = null, + global::System.Func? @static = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAutoParam && autoParam != null) + if (IsAuto && auto != null) { - return autoParam(AutoParam!); + return auto(Auto!); } - else if (IsStaticParam && staticParam != null) + else if (IsStatic && @static != null) { - return staticParam(StaticParam!); + return @static(Static!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? autoParam = null, - global::System.Action? staticParam = null, + global::System.Action? auto = null, + global::System.Action? @static = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAutoParam) + if (IsAuto) { - autoParam?.Invoke(AutoParam!); + auto?.Invoke(Auto!); } - else if (IsStaticParam) + else if (IsStatic) { - staticParam?.Invoke(StaticParam!); + @static?.Invoke(Static!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AutoParam, + Auto, typeof(global::G.AutoChunkingStrategyRequestParam), - StaticParam, + Static, typeof(global::G.StaticChunkingStrategyRequestParam), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateVectorStoreRequestChunkingStrategy other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AutoParam, other.AutoParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticParam, other.StaticParam) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Auto, other.Auto) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem.g.verified.cs index 60e228bd23..2ef184add6 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Details of the Code Interpreter tool call the run step was involved in. /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; init; } + public global::G.RunStepDetailsToolCallsCodeObject? CodeInterpreter { get; init; } #else - public global::G.RunStepDetailsToolCallsCodeObject? RunStepDetailsCodeObject { get; } + public global::G.RunStepDetailsToolCallsCodeObject? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsCodeObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsRunStepDetailsCodeObject => RunStepDetailsCodeObject != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsCodeObject?(ToolCallsItem @this) => @this.RunStepDetailsCodeObject; + public static implicit operator global::G.RunStepDetailsToolCallsCodeObject?(ToolCallsItem @this) => @this.CodeInterpreter; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsCodeObject? value) { - RunStepDetailsCodeObject = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; init; } + public global::G.RunStepDetailsToolCallsFileSearchObject? FileSearch { get; init; } #else - public global::G.RunStepDetailsToolCallsFileSearchObject? RunStepDetailsFileSearchObject { get; } + public global::G.RunStepDetailsToolCallsFileSearchObject? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFileSearchObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsRunStepDetailsFileSearchObject => RunStepDetailsFileSearchObject != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsCodeObject? value) /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsFileSearchObject?(ToolCallsItem @this) => @this.RunStepDetailsFileSearchObject; + public static implicit operator global::G.RunStepDetailsToolCallsFileSearchObject?(ToolCallsItem @this) => @this.FileSearch; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsFileSearchObject? value) { - RunStepDetailsFileSearchObject = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; init; } + public global::G.RunStepDetailsToolCallsFunctionObject? Function { get; init; } #else - public global::G.RunStepDetailsToolCallsFunctionObject? RunStepDetailsFunctionObject { get; } + public global::G.RunStepDetailsToolCallsFunctionObject? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDetailsFunctionObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsRunStepDetailsFunctionObject => RunStepDetailsFunctionObject != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsFileSearchObject? value) /// /// /// - public static implicit operator global::G.RunStepDetailsToolCallsFunctionObject?(ToolCallsItem @this) => @this.RunStepDetailsFunctionObject; + public static implicit operator global::G.RunStepDetailsToolCallsFunctionObject?(ToolCallsItem @this) => @this.Function; /// /// /// public ToolCallsItem(global::G.RunStepDetailsToolCallsFunctionObject? value) { - RunStepDetailsFunctionObject = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolCallsItem(global::G.RunStepDetailsToolCallsFunctionObject? value) /// public ToolCallsItem( global::G.RunStepDetailsToolCallsObjectToolCallDiscriminatorType? type, - global::G.RunStepDetailsToolCallsCodeObject? runStepDetailsCodeObject, - global::G.RunStepDetailsToolCallsFileSearchObject? runStepDetailsFileSearchObject, - global::G.RunStepDetailsToolCallsFunctionObject? runStepDetailsFunctionObject + global::G.RunStepDetailsToolCallsCodeObject? codeInterpreter, + global::G.RunStepDetailsToolCallsFileSearchObject? fileSearch, + global::G.RunStepDetailsToolCallsFunctionObject? function ) { Type = type; - RunStepDetailsCodeObject = runStepDetailsCodeObject; - RunStepDetailsFileSearchObject = runStepDetailsFileSearchObject; - RunStepDetailsFunctionObject = runStepDetailsFunctionObject; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - RunStepDetailsFunctionObject as object ?? - RunStepDetailsFileSearchObject as object ?? - RunStepDetailsCodeObject as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ RunStepDetailsCodeObject as object /// public bool Validate() { - return IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && IsRunStepDetailsFileSearchObject && !IsRunStepDetailsFunctionObject || !IsRunStepDetailsCodeObject && !IsRunStepDetailsFileSearchObject && IsRunStepDetailsFunctionObject; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? runStepDetailsCodeObject = null, - global::System.Func? runStepDetailsFileSearchObject = null, - global::System.Func? runStepDetailsFunctionObject = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsRunStepDetailsCodeObject && runStepDetailsCodeObject != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return runStepDetailsCodeObject(RunStepDetailsCodeObject!); + return codeInterpreter(CodeInterpreter!); } - else if (IsRunStepDetailsFileSearchObject && runStepDetailsFileSearchObject != null) + else if (IsFileSearch && fileSearch != null) { - return runStepDetailsFileSearchObject(RunStepDetailsFileSearchObject!); + return fileSearch(FileSearch!); } - else if (IsRunStepDetailsFunctionObject && runStepDetailsFunctionObject != null) + else if (IsFunction && function != null) { - return runStepDetailsFunctionObject(RunStepDetailsFunctionObject!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? runStepDetailsCodeObject = null, - global::System.Action? runStepDetailsFileSearchObject = null, - global::System.Action? runStepDetailsFunctionObject = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsRunStepDetailsCodeObject) + if (IsCodeInterpreter) { - runStepDetailsCodeObject?.Invoke(RunStepDetailsCodeObject!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsRunStepDetailsFileSearchObject) + else if (IsFileSearch) { - runStepDetailsFileSearchObject?.Invoke(RunStepDetailsFileSearchObject!); + fileSearch?.Invoke(FileSearch!); } - else if (IsRunStepDetailsFunctionObject) + else if (IsFunction) { - runStepDetailsFunctionObject?.Invoke(RunStepDetailsFunctionObject!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - RunStepDetailsCodeObject, + CodeInterpreter, typeof(global::G.RunStepDetailsToolCallsCodeObject), - RunStepDetailsFileSearchObject, + FileSearch, typeof(global::G.RunStepDetailsToolCallsFileSearchObject), - RunStepDetailsFunctionObject, + Function, typeof(global::G.RunStepDetailsToolCallsFunctionObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolCallsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsCodeObject, other.RunStepDetailsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFileSearchObject, other.RunStepDetailsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDetailsFunctionObject, other.RunStepDetailsFunctionObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem2.g.verified.cs index c0695cce62..11b295e4ae 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolCallsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Details of the Code Interpreter tool call the run step was involved in. /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? CodeInterpreter { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? RunStepDeltaDetailsCodeObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsCodeObject? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsCodeObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsRunStepDeltaDetailsCodeObject => RunStepDeltaDetailsCodeObject != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsCodeObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsCodeObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsCodeObject?(ToolCallsItem2 @this) => @this.CodeInterpreter; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsCodeObject? value) { - RunStepDeltaDetailsCodeObject = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? FileSearch { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? RunStepDeltaDetailsFileSearchObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFileSearchObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsRunStepDeltaDetailsFileSearchObject => RunStepDeltaDetailsFileSearchObject != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsCodeObject? valu /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsFileSearchObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject?(ToolCallsItem2 @this) => @this.FileSearch; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? value) { - RunStepDeltaDetailsFileSearchObject = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; init; } + public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? Function { get; init; } #else - public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? RunStepDeltaDetailsFunctionObject { get; } + public global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(RunStepDeltaDetailsFunctionObject))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsRunStepDeltaDetailsFunctionObject => RunStepDeltaDetailsFunctionObject != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject /// /// /// - public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFunctionObject?(ToolCallsItem2 @this) => @this.RunStepDeltaDetailsFunctionObject; + public static implicit operator global::G.RunStepDeltaStepDetailsToolCallsFunctionObject?(ToolCallsItem2 @this) => @this.Function; /// /// /// public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? value) { - RunStepDeltaDetailsFunctionObject = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolCallsItem2(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? /// public ToolCallsItem2( global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType? type, - global::G.RunStepDeltaStepDetailsToolCallsCodeObject? runStepDeltaDetailsCodeObject, - global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? runStepDeltaDetailsFileSearchObject, - global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? runStepDeltaDetailsFunctionObject + global::G.RunStepDeltaStepDetailsToolCallsCodeObject? codeInterpreter, + global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? fileSearch, + global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? function ) { Type = type; - RunStepDeltaDetailsCodeObject = runStepDeltaDetailsCodeObject; - RunStepDeltaDetailsFileSearchObject = runStepDeltaDetailsFileSearchObject; - RunStepDeltaDetailsFunctionObject = runStepDeltaDetailsFunctionObject; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - RunStepDeltaDetailsFunctionObject as object ?? - RunStepDeltaDetailsFileSearchObject as object ?? - RunStepDeltaDetailsCodeObject as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ RunStepDeltaDetailsCodeObject as object /// public bool Validate() { - return IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && IsRunStepDeltaDetailsFileSearchObject && !IsRunStepDeltaDetailsFunctionObject || !IsRunStepDeltaDetailsCodeObject && !IsRunStepDeltaDetailsFileSearchObject && IsRunStepDeltaDetailsFunctionObject; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? runStepDeltaDetailsCodeObject = null, - global::System.Func? runStepDeltaDetailsFileSearchObject = null, - global::System.Func? runStepDeltaDetailsFunctionObject = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsRunStepDeltaDetailsCodeObject && runStepDeltaDetailsCodeObject != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return runStepDeltaDetailsCodeObject(RunStepDeltaDetailsCodeObject!); + return codeInterpreter(CodeInterpreter!); } - else if (IsRunStepDeltaDetailsFileSearchObject && runStepDeltaDetailsFileSearchObject != null) + else if (IsFileSearch && fileSearch != null) { - return runStepDeltaDetailsFileSearchObject(RunStepDeltaDetailsFileSearchObject!); + return fileSearch(FileSearch!); } - else if (IsRunStepDeltaDetailsFunctionObject && runStepDeltaDetailsFunctionObject != null) + else if (IsFunction && function != null) { - return runStepDeltaDetailsFunctionObject(RunStepDeltaDetailsFunctionObject!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? runStepDeltaDetailsCodeObject = null, - global::System.Action? runStepDeltaDetailsFileSearchObject = null, - global::System.Action? runStepDeltaDetailsFunctionObject = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsRunStepDeltaDetailsCodeObject) + if (IsCodeInterpreter) { - runStepDeltaDetailsCodeObject?.Invoke(RunStepDeltaDetailsCodeObject!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsRunStepDeltaDetailsFileSearchObject) + else if (IsFileSearch) { - runStepDeltaDetailsFileSearchObject?.Invoke(RunStepDeltaDetailsFileSearchObject!); + fileSearch?.Invoke(FileSearch!); } - else if (IsRunStepDeltaDetailsFunctionObject) + else if (IsFunction) { - runStepDeltaDetailsFunctionObject?.Invoke(RunStepDeltaDetailsFunctionObject!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - RunStepDeltaDetailsCodeObject, + CodeInterpreter, typeof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject), - RunStepDeltaDetailsFileSearchObject, + FileSearch, typeof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject), - RunStepDeltaDetailsFunctionObject, + Function, typeof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolCallsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsCodeObject, other.RunStepDeltaDetailsCodeObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFileSearchObject, other.RunStepDeltaDetailsFileSearchObject) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(RunStepDeltaDetailsFunctionObject, other.RunStepDeltaDetailsFunctionObject) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem.g.verified.cs index c20ee1ba5f..8f86be3ae0 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem @this) => @this.CodeInterpreter; /// /// /// public ToolsItem(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem @this) => @this.FileSearch; /// /// /// public ToolsItem(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem @this) => @this.Function; /// /// /// public ToolsItem(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem(global::G.AssistantToolsFunction? value) /// public ToolsItem( global::G.AssistantObjectToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem2.g.verified.cs index e2a6759180..0bf9423c1c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem2 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem2 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem2(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem2(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem2 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem2 @this) => @this.FileSearch; /// /// /// public ToolsItem2(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem2(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem2 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem2 @this) => @this.Function; /// /// /// public ToolsItem2(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem2(global::G.AssistantToolsFunction? value) /// public ToolsItem2( global::G.CreateAssistantRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem3.g.verified.cs index cfb943e368..60f65c60bd 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem3 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem3 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem3(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem3(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem3 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem3 @this) => @this.FileSearch; /// /// /// public ToolsItem3(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem3(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem3 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem3 @this) => @this.Function; /// /// /// public ToolsItem3(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem3(global::G.AssistantToolsFunction? value) /// public ToolsItem3( global::G.ModifyAssistantRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem4.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem4.g.verified.cs index acbc43790d..3f5f53ca16 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem4.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem4.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem4 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem4 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem4(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem4(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem4 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem4 @this) => @this.FileSearch; /// /// /// public ToolsItem4(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem4(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem4 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem4 @this) => @this.Function; /// /// /// public ToolsItem4(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem4(global::G.AssistantToolsFunction? value) /// public ToolsItem4( global::G.RunObjectToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem4 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem5.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem5.g.verified.cs index c4d681a477..2f85a31fcf 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem5.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem5.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem5 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem5 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem5(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem5(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem5 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem5 @this) => @this.FileSearch; /// /// /// public ToolsItem5(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem5(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem5 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem5 @this) => @this.Function; /// /// /// public ToolsItem5(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem5(global::G.AssistantToolsFunction? value) /// public ToolsItem5( global::G.CreateRunRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem5 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem6.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem6.g.verified.cs index ee2c7e9068..bc4f15b528 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem6.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem6.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem6 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem6 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem6(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; init; } + public global::G.AssistantToolsFileSearch? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearch? AssistantFileSearch { get; } + public global::G.AssistantToolsFileSearch? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearch => AssistantFileSearch != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,32 +76,32 @@ public ToolsItem6(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem6 @this) => @this.AssistantFileSearch; + public static implicit operator global::G.AssistantToolsFileSearch?(ToolsItem6 @this) => @this.FileSearch; /// /// /// public ToolsItem6(global::G.AssistantToolsFileSearch? value) { - AssistantFileSearch = value; + FileSearch = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFunction? AssistantFunction { get; init; } + public global::G.AssistantToolsFunction? Function { get; init; } #else - public global::G.AssistantToolsFunction? AssistantFunction { get; } + public global::G.AssistantToolsFunction? Function { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Function))] #endif - public bool IsAssistantFunction => AssistantFunction != null; + public bool IsFunction => Function != null; /// /// @@ -111,14 +111,14 @@ public ToolsItem6(global::G.AssistantToolsFileSearch? value) /// /// /// - public static implicit operator global::G.AssistantToolsFunction?(ToolsItem6 @this) => @this.AssistantFunction; + public static implicit operator global::G.AssistantToolsFunction?(ToolsItem6 @this) => @this.Function; /// /// /// public ToolsItem6(global::G.AssistantToolsFunction? value) { - AssistantFunction = value; + Function = value; } /// @@ -126,25 +126,25 @@ public ToolsItem6(global::G.AssistantToolsFunction? value) /// public ToolsItem6( global::G.CreateThreadAndRunRequestToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearch? assistantFileSearch, - global::G.AssistantToolsFunction? assistantFunction + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearch? fileSearch, + global::G.AssistantToolsFunction? function ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearch = assistantFileSearch; - AssistantFunction = assistantFunction; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; + Function = function; } /// /// /// public object? Object => - AssistantFunction as object ?? - AssistantFileSearch as object ?? - AssistantCode as object + Function as object ?? + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -152,16 +152,16 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && IsAssistantFileSearch && !IsAssistantFunction || !IsAssistantCode && !IsAssistantFileSearch && IsAssistantFunction; + return IsCodeInterpreter && !IsFileSearch && !IsFunction || !IsCodeInterpreter && IsFileSearch && !IsFunction || !IsCodeInterpreter && !IsFileSearch && IsFunction; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearch = null, - global::System.Func? assistantFunction = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, + global::System.Func? function = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearch && assistantFileSearch != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearch(AssistantFileSearch!); + return fileSearch(FileSearch!); } - else if (IsAssistantFunction && assistantFunction != null) + else if (IsFunction && function != null) { - return assistantFunction(AssistantFunction!); + return function(Function!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearch = null, - global::System.Action? assistantFunction = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, + global::System.Action? function = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearch) + else if (IsFileSearch) { - assistantFileSearch?.Invoke(AssistantFileSearch!); + fileSearch?.Invoke(FileSearch!); } - else if (IsAssistantFunction) + else if (IsFunction) { - assistantFunction?.Invoke(AssistantFunction!); + function?.Invoke(Function!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearch, + FileSearch, typeof(global::G.AssistantToolsFileSearch), - AssistantFunction, + Function, typeof(global::G.AssistantToolsFunction), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem6 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearch, other.AssistantFileSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFunction, other.AssistantFunction) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Function, other.Function) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem7.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem7.g.verified.cs index 374b3f4760..14ddb2e9b2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem7.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem7.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem7 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem7 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem7(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,14 +76,14 @@ public ToolsItem7(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem7 @this) => @this.AssistantFileSearchTypeOnly; + public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem7 @this) => @this.FileSearch; /// /// /// public ToolsItem7(global::G.AssistantToolsFileSearchTypeOnly? value) { - AssistantFileSearchTypeOnly = value; + FileSearch = value; } /// @@ -91,22 +91,22 @@ public ToolsItem7(global::G.AssistantToolsFileSearchTypeOnly? value) /// public ToolsItem7( global::G.MessageObjectAttachmentToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearchTypeOnly? fileSearch ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; } /// /// /// public object? Object => - AssistantFileSearchTypeOnly as object ?? - AssistantCode as object + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -114,15 +114,15 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + return IsCodeInterpreter && !IsFileSearch || !IsCodeInterpreter && IsFileSearch; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearchTypeOnly = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + return fileSearch(FileSearch!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearchTypeOnly = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly) + else if (IsFileSearch) { - assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + fileSearch?.Invoke(FileSearch!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearchTypeOnly, + FileSearch, typeof(global::G.AssistantToolsFileSearchTypeOnly), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem7 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem8.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem8.g.verified.cs index 01732415f2..0000e3c470 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem8.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.ToolsItem8.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsCode? AssistantCode { get; init; } + public global::G.AssistantToolsCode? CodeInterpreter { get; init; } #else - public global::G.AssistantToolsCode? AssistantCode { get; } + public global::G.AssistantToolsCode? CodeInterpreter { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantCode))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CodeInterpreter))] #endif - public bool IsAssistantCode => AssistantCode != null; + public bool IsCodeInterpreter => CodeInterpreter != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.AssistantToolsCode?(ToolsItem8 @this) => @this.AssistantCode; + public static implicit operator global::G.AssistantToolsCode?(ToolsItem8 @this) => @this.CodeInterpreter; /// /// /// public ToolsItem8(global::G.AssistantToolsCode? value) { - AssistantCode = value; + CodeInterpreter = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; init; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; init; } #else - public global::G.AssistantToolsFileSearchTypeOnly? AssistantFileSearchTypeOnly { get; } + public global::G.AssistantToolsFileSearchTypeOnly? FileSearch { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantFileSearchTypeOnly))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] #endif - public bool IsAssistantFileSearchTypeOnly => AssistantFileSearchTypeOnly != null; + public bool IsFileSearch => FileSearch != null; /// /// @@ -76,14 +76,14 @@ public ToolsItem8(global::G.AssistantToolsCode? value) /// /// /// - public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem8 @this) => @this.AssistantFileSearchTypeOnly; + public static implicit operator global::G.AssistantToolsFileSearchTypeOnly?(ToolsItem8 @this) => @this.FileSearch; /// /// /// public ToolsItem8(global::G.AssistantToolsFileSearchTypeOnly? value) { - AssistantFileSearchTypeOnly = value; + FileSearch = value; } /// @@ -91,22 +91,22 @@ public ToolsItem8(global::G.AssistantToolsFileSearchTypeOnly? value) /// public ToolsItem8( global::G.CreateMessageRequestAttachmentToolDiscriminatorType? type, - global::G.AssistantToolsCode? assistantCode, - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly + global::G.AssistantToolsCode? codeInterpreter, + global::G.AssistantToolsFileSearchTypeOnly? fileSearch ) { Type = type; - AssistantCode = assistantCode; - AssistantFileSearchTypeOnly = assistantFileSearchTypeOnly; + CodeInterpreter = codeInterpreter; + FileSearch = fileSearch; } /// /// /// public object? Object => - AssistantFileSearchTypeOnly as object ?? - AssistantCode as object + FileSearch as object ?? + CodeInterpreter as object ; /// @@ -114,15 +114,15 @@ AssistantCode as object /// public bool Validate() { - return IsAssistantCode && !IsAssistantFileSearchTypeOnly || !IsAssistantCode && IsAssistantFileSearchTypeOnly; + return IsCodeInterpreter && !IsFileSearch || !IsCodeInterpreter && IsFileSearch; } /// /// /// public TResult? Match( - global::System.Func? assistantCode = null, - global::System.Func? assistantFileSearchTypeOnly = null, + global::System.Func? codeInterpreter = null, + global::System.Func? fileSearch = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsAssistantCode && assistantCode != null) + if (IsCodeInterpreter && codeInterpreter != null) { - return assistantCode(AssistantCode!); + return codeInterpreter(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly && assistantFileSearchTypeOnly != null) + else if (IsFileSearch && fileSearch != null) { - return assistantFileSearchTypeOnly(AssistantFileSearchTypeOnly!); + return fileSearch(FileSearch!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? assistantCode = null, - global::System.Action? assistantFileSearchTypeOnly = null, + global::System.Action? codeInterpreter = null, + global::System.Action? fileSearch = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsAssistantCode) + if (IsCodeInterpreter) { - assistantCode?.Invoke(AssistantCode!); + codeInterpreter?.Invoke(CodeInterpreter!); } - else if (IsAssistantFileSearchTypeOnly) + else if (IsFileSearch) { - assistantFileSearchTypeOnly?.Invoke(AssistantFileSearchTypeOnly!); + fileSearch?.Invoke(FileSearch!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - AssistantCode, + CodeInterpreter, typeof(global::G.AssistantToolsCode), - AssistantFileSearchTypeOnly, + FileSearch, typeof(global::G.AssistantToolsFileSearchTypeOnly), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ToolsItem8 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantCode, other.AssistantCode) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantFileSearchTypeOnly, other.AssistantFileSearchTypeOnly) + global::System.Collections.Generic.EqualityComparer.Default.Equals(CodeInterpreter, other.CodeInterpreter) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs index c2961d47e7..fb551cdbcf 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Models.VectorStoreFileObjectChunkingStrategy.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.StaticChunkingStrategyResponseParam? StaticResponseParam { get; init; } + public global::G.StaticChunkingStrategyResponseParam? Static { get; init; } #else - public global::G.StaticChunkingStrategyResponseParam? StaticResponseParam { get; } + public global::G.StaticChunkingStrategyResponseParam? Static { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StaticResponseParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Static))] #endif - public bool IsStaticResponseParam => StaticResponseParam != null; + public bool IsStatic => Static != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StaticChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.StaticResponseParam; + public static implicit operator global::G.StaticChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.Static; /// /// /// public VectorStoreFileObjectChunkingStrategy(global::G.StaticChunkingStrategyResponseParam? value) { - StaticResponseParam = value; + Static = value; } /// /// This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API. /// #if NET6_0_OR_GREATER - public global::G.OtherChunkingStrategyResponseParam? OtherResponseParam { get; init; } + public global::G.OtherChunkingStrategyResponseParam? Other { get; init; } #else - public global::G.OtherChunkingStrategyResponseParam? OtherResponseParam { get; } + public global::G.OtherChunkingStrategyResponseParam? Other { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OtherResponseParam))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Other))] #endif - public bool IsOtherResponseParam => OtherResponseParam != null; + public bool IsOther => Other != null; /// /// @@ -76,14 +76,14 @@ public VectorStoreFileObjectChunkingStrategy(global::G.StaticChunkingStrategyRes /// /// /// - public static implicit operator global::G.OtherChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.OtherResponseParam; + public static implicit operator global::G.OtherChunkingStrategyResponseParam?(VectorStoreFileObjectChunkingStrategy @this) => @this.Other; /// /// /// public VectorStoreFileObjectChunkingStrategy(global::G.OtherChunkingStrategyResponseParam? value) { - OtherResponseParam = value; + Other = value; } /// @@ -91,22 +91,22 @@ public VectorStoreFileObjectChunkingStrategy(global::G.OtherChunkingStrategyResp /// public VectorStoreFileObjectChunkingStrategy( global::G.VectorStoreFileObjectChunkingStrategyDiscriminatorType? type, - global::G.StaticChunkingStrategyResponseParam? staticResponseParam, - global::G.OtherChunkingStrategyResponseParam? otherResponseParam + global::G.StaticChunkingStrategyResponseParam? @static, + global::G.OtherChunkingStrategyResponseParam? other ) { Type = type; - StaticResponseParam = staticResponseParam; - OtherResponseParam = otherResponseParam; + Static = @static; + Other = other; } /// /// /// public object? Object => - OtherResponseParam as object ?? - StaticResponseParam as object + Other as object ?? + Static as object ; /// @@ -114,15 +114,15 @@ StaticResponseParam as object /// public bool Validate() { - return IsStaticResponseParam && !IsOtherResponseParam || !IsStaticResponseParam && IsOtherResponseParam; + return IsStatic && !IsOther || !IsStatic && IsOther; } /// /// /// public TResult? Match( - global::System.Func? staticResponseParam = null, - global::System.Func? otherResponseParam = null, + global::System.Func? @static = null, + global::System.Func? other = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsStaticResponseParam && staticResponseParam != null) + if (IsStatic && @static != null) { - return staticResponseParam(StaticResponseParam!); + return @static(Static!); } - else if (IsOtherResponseParam && otherResponseParam != null) + else if (IsOther && other != null) { - return otherResponseParam(OtherResponseParam!); + return other(Other!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? staticResponseParam = null, - global::System.Action? otherResponseParam = null, + global::System.Action? @static = null, + global::System.Action? other = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsStaticResponseParam) + if (IsStatic) { - staticResponseParam?.Invoke(StaticResponseParam!); + @static?.Invoke(Static!); } - else if (IsOtherResponseParam) + else if (IsOther) { - otherResponseParam?.Invoke(OtherResponseParam!); + other?.Invoke(Other!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - StaticResponseParam, + Static, typeof(global::G.StaticChunkingStrategyResponseParam), - OtherResponseParam, + Other, typeof(global::G.OtherChunkingStrategyResponseParam), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(VectorStoreFileObjectChunkingStrategy other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StaticResponseParam, other.StaticResponseParam) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(OtherResponseParam, other.OtherResponseParam) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Static, other.Static) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Other, other.Other) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem.g.verified.cs index 06ad3d5420..e11dad8fa7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem.g.verified.cs @@ -22,25 +22,25 @@ public class AnnotationsItemJsonConverter : global::System.Text.Json.Serializati throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentTextObjectTextAnnotationDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject = default; + global::G.MessageContentTextAnnotationsFileCitationObject? fileCitation = default; if (discriminator?.Type == global::G.MessageContentTextObjectTextAnnotationDiscriminatorType.FileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentTextAnnotationsFileCitationObject)}"); - messageContentTextFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject = default; + global::G.MessageContentTextAnnotationsFilePathObject? filePath = default; if (discriminator?.Type == global::G.MessageContentTextObjectTextAnnotationDiscriminatorType.FilePath) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentTextAnnotationsFilePathObject)}"); - messageContentTextFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + filePath = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.AnnotationsItem( discriminator?.Type, - messageContentTextFileCitationObject, - messageContentTextFilePathObject + fileCitation, + filePath ); return result; @@ -55,17 +55,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.IsMessageContentTextFileCitationObject) + if (value.IsFileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentTextAnnotationsFileCitationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFileCitationObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo); } - else if (value.IsMessageContentTextFilePathObject) + else if (value.IsFilePath) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentTextAnnotationsFilePathObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFilePathObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem2.g.verified.cs index cf425cfc7e..5f2b77b28a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AnnotationsItem2.g.verified.cs @@ -22,25 +22,25 @@ public class AnnotationsItem2JsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentTextObjectTextAnnotationDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject = default; + global::G.MessageDeltaContentTextAnnotationsFileCitationObject? fileCitation = default; if (discriminator?.Type == global::G.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject)}"); - messageDeltaContentTextFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject = default; + global::G.MessageDeltaContentTextAnnotationsFilePathObject? filePath = default; if (discriminator?.Type == global::G.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FilePath) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentTextAnnotationsFilePathObject)}"); - messageDeltaContentTextFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + filePath = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.AnnotationsItem2( discriminator?.Type, - messageDeltaContentTextFileCitationObject, - messageDeltaContentTextFilePathObject + fileCitation, + filePath ); return result; @@ -55,17 +55,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.IsMessageDeltaContentTextFileCitationObject) + if (value.IsFileCitation) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentTextAnnotationsFileCitationObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFileCitationObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo); } - else if (value.IsMessageDeltaContentTextFilePathObject) + else if (value.IsFilePath) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentTextAnnotationsFilePathObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFilePathObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AssistantStreamEvent.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AssistantStreamEvent.g.verified.cs index 2ae2e1713c..4780ae0a72 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AssistantStreamEvent.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.AssistantStreamEvent.g.verified.cs @@ -22,209 +22,209 @@ public class AssistantStreamEventJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.ErrorEvent? value1 = default; + global::G.ErrorEvent? error = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.Error) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ErrorEvent)}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + error = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.DoneEvent? value2 = default; + global::G.DoneEvent? done = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.Done) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.DoneEvent)}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + done = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant3? value3 = default; + global::G.AssistantStreamEventVariant3? threadCreated = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant3)}"); - value3 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant4? value4 = default; + global::G.AssistantStreamEventVariant4? threadRunCreated = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant4)}"); - value4 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant5? value5 = default; + global::G.AssistantStreamEventVariant5? threadRunQueued = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunQueued) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant5)}"); - value5 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunQueued = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant6? value6 = default; + global::G.AssistantStreamEventVariant6? threadRunInProgress = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant6)}"); - value6 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant7? value7 = default; + global::G.AssistantStreamEventVariant7? threadRunRequiresAction = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunRequiresAction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant7)}"); - value7 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunRequiresAction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant8? value8 = default; + global::G.AssistantStreamEventVariant8? threadRunCompleted = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant8)}"); - value8 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant9? value9 = default; + global::G.AssistantStreamEventVariant9? threadRunIncomplete = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunIncomplete) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant9)}"); - value9 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunIncomplete = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant10? value10 = default; + global::G.AssistantStreamEventVariant10? threadRunFailed = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant10)}"); - value10 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant11? value11 = default; + global::G.AssistantStreamEventVariant11? threadRunCancelling = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunCancelling) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant11)}"); - value11 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunCancelling = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant12? value12 = default; + global::G.AssistantStreamEventVariant12? threadRunCancelled = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunCancelled) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant12)}"); - value12 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunCancelled = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant13? value13 = default; + global::G.AssistantStreamEventVariant13? threadRunExpired = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunExpired) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant13)}"); - value13 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunExpired = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant14? value14 = default; + global::G.AssistantStreamEventVariant14? threadRunStepCreated = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant14)}"); - value14 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant15? value15 = default; + global::G.AssistantStreamEventVariant15? threadRunStepInProgress = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant15)}"); - value15 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant16? value16 = default; + global::G.AssistantStreamEventVariant16? threadRunStepDelta = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant16)}"); - value16 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant17? value17 = default; + global::G.AssistantStreamEventVariant17? threadRunStepCompleted = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant17)}"); - value17 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant18? value18 = default; + global::G.AssistantStreamEventVariant18? threadRunStepFailed = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant18)}"); - value18 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepFailed = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant19? value19 = default; + global::G.AssistantStreamEventVariant19? threadRunStepCancelled = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepCancelled) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant19)}"); - value19 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepCancelled = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant20? value20 = default; + global::G.AssistantStreamEventVariant20? threadRunStepExpired = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadRunStepExpired) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant20)}"); - value20 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadRunStepExpired = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant21? value21 = default; + global::G.AssistantStreamEventVariant21? threadMessageCreated = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadMessageCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant21)}"); - value21 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadMessageCreated = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant22? value22 = default; + global::G.AssistantStreamEventVariant22? threadMessageInProgress = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadMessageInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant22)}"); - value22 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadMessageInProgress = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant23? value23 = default; + global::G.AssistantStreamEventVariant23? threadMessageDelta = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadMessageDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant23)}"); - value23 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadMessageDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant24? value24 = default; + global::G.AssistantStreamEventVariant24? threadMessageCompleted = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadMessageCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant24)}"); - value24 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadMessageCompleted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantStreamEventVariant25? value25 = default; + global::G.AssistantStreamEventVariant25? threadMessageIncomplete = default; if (discriminator?.Event == global::G.AssistantStreamEventDiscriminatorEvent.ThreadMessageIncomplete) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantStreamEventVariant25)}"); - value25 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + threadMessageIncomplete = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.AssistantStreamEvent( discriminator?.Event, - value1, - value2, - value3, - value4, - value5, - value6, - value7, - value8, - value9, - value10, - value11, - value12, - value13, - value14, - value15, - value16, - value17, - value18, - value19, - value20, - value21, - value22, - value23, - value24, - value25 + error, + done, + threadCreated, + threadRunCreated, + threadRunQueued, + threadRunInProgress, + threadRunRequiresAction, + threadRunCompleted, + threadRunIncomplete, + threadRunFailed, + threadRunCancelling, + threadRunCancelled, + threadRunExpired, + threadRunStepCreated, + threadRunStepInProgress, + threadRunStepDelta, + threadRunStepCompleted, + threadRunStepFailed, + threadRunStepCancelled, + threadRunStepExpired, + threadMessageCreated, + threadMessageInProgress, + threadMessageDelta, + threadMessageCompleted, + threadMessageIncomplete ); return result; @@ -239,155 +239,155 @@ 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.IsError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ErrorEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ErrorEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); } - else if (value.IsValue2) + else if (value.IsDone) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.DoneEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.DoneEvent).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Done, typeInfo); } - else if (value.IsValue3) + else if (value.IsThreadCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant3), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant3).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value3, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadCreated, typeInfo); } - else if (value.IsValue4) + else if (value.IsThreadRunCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant4), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant4).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value4, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunCreated, typeInfo); } - else if (value.IsValue5) + else if (value.IsThreadRunQueued) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant5), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant5).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value5, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunQueued, typeInfo); } - else if (value.IsValue6) + else if (value.IsThreadRunInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant6), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant6).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value6, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunInProgress, typeInfo); } - else if (value.IsValue7) + else if (value.IsThreadRunRequiresAction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant7), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant7).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value7, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunRequiresAction, typeInfo); } - else if (value.IsValue8) + else if (value.IsThreadRunCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant8), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant8).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value8, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunCompleted, typeInfo); } - else if (value.IsValue9) + else if (value.IsThreadRunIncomplete) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant9), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant9).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value9, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunIncomplete, typeInfo); } - else if (value.IsValue10) + else if (value.IsThreadRunFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant10), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant10).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value10, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunFailed, typeInfo); } - else if (value.IsValue11) + else if (value.IsThreadRunCancelling) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant11), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant11).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value11, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunCancelling, typeInfo); } - else if (value.IsValue12) + else if (value.IsThreadRunCancelled) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant12), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant12).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value12, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunCancelled, typeInfo); } - else if (value.IsValue13) + else if (value.IsThreadRunExpired) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant13), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant13).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value13, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunExpired, typeInfo); } - else if (value.IsValue14) + else if (value.IsThreadRunStepCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant14), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant14).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value14, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepCreated, typeInfo); } - else if (value.IsValue15) + else if (value.IsThreadRunStepInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant15), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant15).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value15, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepInProgress, typeInfo); } - else if (value.IsValue16) + else if (value.IsThreadRunStepDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant16), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant16).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value16, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepDelta, typeInfo); } - else if (value.IsValue17) + else if (value.IsThreadRunStepCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant17), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant17).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value17, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepCompleted, typeInfo); } - else if (value.IsValue18) + else if (value.IsThreadRunStepFailed) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant18), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant18).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value18, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepFailed, typeInfo); } - else if (value.IsValue19) + else if (value.IsThreadRunStepCancelled) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant19), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant19).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value19, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepCancelled, typeInfo); } - else if (value.IsValue20) + else if (value.IsThreadRunStepExpired) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant20), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant20).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value20, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadRunStepExpired, typeInfo); } - else if (value.IsValue21) + else if (value.IsThreadMessageCreated) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant21), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant21).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value21, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadMessageCreated, typeInfo); } - else if (value.IsValue22) + else if (value.IsThreadMessageInProgress) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant22), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant22).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value22, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadMessageInProgress, typeInfo); } - else if (value.IsValue23) + else if (value.IsThreadMessageDelta) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant23), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant23).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value23, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadMessageDelta, typeInfo); } - else if (value.IsValue24) + else if (value.IsThreadMessageCompleted) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant24), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant24).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value24, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadMessageCompleted, typeInfo); } - else if (value.IsValue25) + else if (value.IsThreadMessageIncomplete) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantStreamEventVariant25), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantStreamEventVariant25).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value25, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ThreadMessageIncomplete, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ChatCompletionRequestUserMessageContentPart.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ChatCompletionRequestUserMessageContentPart.g.verified.cs index 309d231f5e..e68427c391 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ChatCompletionRequestUserMessageContentPart.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ChatCompletionRequestUserMessageContentPart.g.verified.cs @@ -29,18 +29,18 @@ public class ChatCompletionRequestUserMessageContentPartJsonConverter : global:: throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ChatCompletionRequestMessageContentPartText)}"); text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ChatCompletionRequestMessageContentPartImage? image = default; + global::G.ChatCompletionRequestMessageContentPartImage? imageUrl = default; if (discriminator?.Type == global::G.ChatCompletionRequestUserMessageContentPartDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ChatCompletionRequestMessageContentPartImage)}"); - image = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ChatCompletionRequestUserMessageContentPart( discriminator?.Type, text, - image + imageUrl ); return result; @@ -61,11 +61,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ChatCompletionRequestMessageContentPartText).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsImage) + else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ChatCompletionRequestMessageContentPartImage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ChatCompletionRequestMessageContentPartImage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Image, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem.g.verified.cs index 190e724084..b77588da15 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem.g.verified.cs @@ -22,41 +22,41 @@ public class ContentItemJsonConverter : global::System.Text.Json.Serialization.J throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageObjectContentItemDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageContentImageFileObject? messageImageFileObject = default; + global::G.MessageContentImageFileObject? imageFile = default; if (discriminator?.Type == global::G.MessageObjectContentItemDiscriminatorType.ImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentImageFileObject)}"); - messageImageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageFile = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageContentImageUrlObject? messageImageUrlObject = default; + global::G.MessageContentImageUrlObject? imageUrl = default; if (discriminator?.Type == global::G.MessageObjectContentItemDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentImageUrlObject)}"); - messageImageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageContentTextObject? messageTextObject = default; + global::G.MessageContentTextObject? text = default; if (discriminator?.Type == global::G.MessageObjectContentItemDiscriminatorType.Text) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentTextObject)}"); - messageTextObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageContentRefusalObject? messageRefusalObject = default; + global::G.MessageContentRefusalObject? refusal = default; if (discriminator?.Type == global::G.MessageObjectContentItemDiscriminatorType.Refusal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentRefusalObject)}"); - messageRefusalObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + refusal = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ContentItem( discriminator?.Type, - messageImageFileObject, - messageImageUrlObject, - messageTextObject, - messageRefusalObject + imageFile, + imageUrl, + text, + refusal ); return result; @@ -71,29 +71,29 @@ 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.IsMessageImageFileObject) + if (value.IsImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageFileObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageFile, typeInfo); } - else if (value.IsMessageImageUrlObject) + else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageUrlObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeInfo); } - else if (value.IsMessageTextObject) + else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageTextObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsMessageRefusalObject) + else if (value.IsRefusal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentRefusalObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageRefusalObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem2.g.verified.cs index e6e368beda..0d50944f9b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentItem2.g.verified.cs @@ -22,41 +22,41 @@ public class ContentItem2JsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaObjectDeltaContentItemDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageDeltaContentImageFileObject? messageDeltaImageFileObject = default; + global::G.MessageDeltaContentImageFileObject? imageFile = default; if (discriminator?.Type == global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentImageFileObject)}"); - messageDeltaImageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageFile = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageDeltaContentTextObject? messageDeltaTextObject = default; + global::G.MessageDeltaContentTextObject? text = default; if (discriminator?.Type == global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType.Text) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentTextObject)}"); - messageDeltaTextObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageDeltaContentRefusalObject? messageDeltaRefusalObject = default; + global::G.MessageDeltaContentRefusalObject? refusal = default; if (discriminator?.Type == global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType.Refusal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentRefusalObject)}"); - messageDeltaRefusalObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + refusal = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageDeltaContentImageUrlObject? messageDeltaImageUrlObject = default; + global::G.MessageDeltaContentImageUrlObject? imageUrl = default; if (discriminator?.Type == global::G.MessageDeltaObjectDeltaContentItemDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageDeltaContentImageUrlObject)}"); - messageDeltaImageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ContentItem2( discriminator?.Type, - messageDeltaImageFileObject, - messageDeltaTextObject, - messageDeltaRefusalObject, - messageDeltaImageUrlObject + imageFile, + text, + refusal, + imageUrl ); return result; @@ -71,29 +71,29 @@ 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.IsMessageDeltaImageFileObject) + if (value.IsImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaImageFileObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageFile, typeInfo); } - else if (value.IsMessageDeltaTextObject) + else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaTextObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsMessageDeltaRefusalObject) + else if (value.IsRefusal) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentRefusalObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentRefusalObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaRefusalObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Refusal, typeInfo); } - else if (value.IsMessageDeltaImageUrlObject) + else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageDeltaContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageDeltaContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaImageUrlObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentVariant2Item.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentVariant2Item.g.verified.cs index f2868c7383..b1cffce82b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentVariant2Item.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ContentVariant2Item.g.verified.cs @@ -22,33 +22,33 @@ public class ContentVariant2ItemJsonConverter : global::System.Text.Json.Seriali throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateMessageRequestContentVariant2ItemDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.MessageContentImageFileObject? messageImageFileObject = default; + global::G.MessageContentImageFileObject? imageFile = default; if (discriminator?.Type == global::G.CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentImageFileObject)}"); - messageImageFileObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageFile = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageContentImageUrlObject? messageImageUrlObject = default; + global::G.MessageContentImageUrlObject? imageUrl = default; if (discriminator?.Type == global::G.CreateMessageRequestContentVariant2ItemDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageContentImageUrlObject)}"); - messageImageUrlObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MessageRequestContentTextObject? messageRequestTextObject = default; + global::G.MessageRequestContentTextObject? text = default; if (discriminator?.Type == global::G.CreateMessageRequestContentVariant2ItemDiscriminatorType.Text) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageRequestContentTextObject)}"); - messageRequestTextObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ContentVariant2Item( discriminator?.Type, - messageImageFileObject, - messageImageUrlObject, - messageRequestTextObject + imageFile, + imageUrl, + text ); return result; @@ -63,23 +63,23 @@ 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.IsMessageImageFileObject) + if (value.IsImageFile) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageFileObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentImageFileObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageFileObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageFile, typeInfo); } - else if (value.IsMessageImageUrlObject) + else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageContentImageUrlObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageContentImageUrlObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageImageUrlObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeInfo); } - else if (value.IsMessageRequestTextObject) + else if (value.IsText) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MessageRequestContentTextObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MessageRequestContentTextObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageRequestTextObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index be5236fb10..c2852a2205 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -22,25 +22,25 @@ public class CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStr throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto = default; if (discriminator?.Type == global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1)}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + auto = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; + global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static = default; if (discriminator?.Type == global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2)}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @static = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy( discriminator?.Type, - value1, - value2 + auto, + @static ); return result; @@ -55,17 +55,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.IsAuto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Auto, typeInfo); } - else if (value.IsValue2) + else if (value.IsStatic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Static, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs index 62cc14d7bb..0d86d599e8 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy.g.verified.cs @@ -22,25 +22,25 @@ public class CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrate throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? value1 = default; + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? auto = default; if (discriminator?.Type == global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Auto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1)}"); - value1 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + auto = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? value2 = default; + global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? @static = default; if (discriminator?.Type == global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType.Static) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2)}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @static = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy( discriminator?.Type, - value1, - value2 + auto, + @static ); return result; @@ -55,17 +55,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.IsAuto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Auto, typeInfo); } - else if (value.IsValue2) + else if (value.IsStatic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Static, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.verified.cs index a4d510ea04..58a8a4985c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.CreateVectorStoreRequestChunkingStrategy.g.verified.cs @@ -22,25 +22,25 @@ public class CreateVectorStoreRequestChunkingStrategyJsonConverter : global::Sys throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateVectorStoreRequestChunkingStrategyDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AutoChunkingStrategyRequestParam? autoParam = default; + global::G.AutoChunkingStrategyRequestParam? auto = default; if (discriminator?.Type == global::G.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Auto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AutoChunkingStrategyRequestParam)}"); - autoParam = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + auto = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StaticChunkingStrategyRequestParam? staticParam = default; + global::G.StaticChunkingStrategyRequestParam? @static = default; if (discriminator?.Type == global::G.CreateVectorStoreRequestChunkingStrategyDiscriminatorType.Static) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StaticChunkingStrategyRequestParam)}"); - staticParam = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @static = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.CreateVectorStoreRequestChunkingStrategy( discriminator?.Type, - autoParam, - staticParam + auto, + @static ); return result; @@ -55,17 +55,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.IsAutoParam) + if (value.IsAuto) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AutoChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AutoChunkingStrategyRequestParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AutoParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Auto, typeInfo); } - else if (value.IsStaticParam) + else if (value.IsStatic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StaticChunkingStrategyRequestParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StaticChunkingStrategyRequestParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StaticParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Static, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem.g.verified.cs index cd027ba275..ad90f1c088 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem.g.verified.cs @@ -22,33 +22,33 @@ public class ToolCallsItemJsonConverter : global::System.Text.Json.Serialization throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDetailsToolCallsObjectToolCallDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.RunStepDetailsToolCallsCodeObject? runStepDetailsCodeObject = default; + global::G.RunStepDetailsToolCallsCodeObject? codeInterpreter = default; if (discriminator?.Type == global::G.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDetailsToolCallsCodeObject)}"); - runStepDetailsCodeObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RunStepDetailsToolCallsFileSearchObject? runStepDetailsFileSearchObject = default; + global::G.RunStepDetailsToolCallsFileSearchObject? fileSearch = default; if (discriminator?.Type == global::G.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDetailsToolCallsFileSearchObject)}"); - runStepDetailsFileSearchObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RunStepDetailsToolCallsFunctionObject? runStepDetailsFunctionObject = default; + global::G.RunStepDetailsToolCallsFunctionObject? function = default; if (discriminator?.Type == global::G.RunStepDetailsToolCallsObjectToolCallDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDetailsToolCallsFunctionObject)}"); - runStepDetailsFunctionObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolCallsItem( discriminator?.Type, - runStepDetailsCodeObject, - runStepDetailsFileSearchObject, - runStepDetailsFunctionObject + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsRunStepDetailsCodeObject) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDetailsToolCallsCodeObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsCodeObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsRunStepDetailsFileSearchObject) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDetailsToolCallsFileSearchObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsFileSearchObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsRunStepDetailsFunctionObject) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDetailsToolCallsFunctionObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDetailsFunctionObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem2.g.verified.cs index 13681bb1b5..d8c2924dee 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolCallsItem2.g.verified.cs @@ -22,33 +22,33 @@ public class ToolCallsItem2JsonConverter : global::System.Text.Json.Serializatio throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.RunStepDeltaStepDetailsToolCallsCodeObject? runStepDeltaDetailsCodeObject = default; + global::G.RunStepDeltaStepDetailsToolCallsCodeObject? codeInterpreter = default; if (discriminator?.Type == global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject)}"); - runStepDeltaDetailsCodeObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? runStepDeltaDetailsFileSearchObject = default; + global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject? fileSearch = default; if (discriminator?.Type == global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject)}"); - runStepDeltaDetailsFileSearchObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? runStepDeltaDetailsFunctionObject = default; + global::G.RunStepDeltaStepDetailsToolCallsFunctionObject? function = default; if (discriminator?.Type == global::G.RunStepDeltaStepDetailsToolCallsObjectToolCallDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject)}"); - runStepDeltaDetailsFunctionObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolCallsItem2( discriminator?.Type, - runStepDeltaDetailsCodeObject, - runStepDeltaDetailsFileSearchObject, - runStepDeltaDetailsFunctionObject + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsRunStepDeltaDetailsCodeObject) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDeltaStepDetailsToolCallsCodeObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsCodeObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsRunStepDeltaDetailsFileSearchObject) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDeltaStepDetailsToolCallsFileSearchObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsFileSearchObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsRunStepDeltaDetailsFunctionObject) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.RunStepDeltaStepDetailsToolCallsFunctionObject).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.RunStepDeltaDetailsFunctionObject, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem.g.verified.cs index 0c52fa35ac..bcbe1e7243 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItemJsonConverter : global::System.Text.Json.Serialization.Jso throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantObjectToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.AssistantObjectToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.AssistantObjectToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.AssistantObjectToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem2.g.verified.cs index 08583cd269..e744db808e 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem2.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItem2JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateAssistantRequestToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.CreateAssistantRequestToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.CreateAssistantRequestToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.CreateAssistantRequestToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem2( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem3.g.verified.cs index 9824bc21bc..17bb90eee0 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem3.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItem3JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ModifyAssistantRequestToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.ModifyAssistantRequestToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.ModifyAssistantRequestToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.ModifyAssistantRequestToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem3( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem4.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem4.g.verified.cs index 5e2d71a75b..85415814ec 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem4.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem4.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItem4JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RunObjectToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.RunObjectToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.RunObjectToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.RunObjectToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem4( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem5.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem5.g.verified.cs index beb40ce7b2..3a7cdbc47e 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem5.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem5.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItem5JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateRunRequestToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.CreateRunRequestToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.CreateRunRequestToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.CreateRunRequestToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem5( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem6.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem6.g.verified.cs index e6d20a3c79..9506ad363a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem6.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem6.g.verified.cs @@ -22,33 +22,33 @@ public class ToolsItem6JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateThreadAndRunRequestToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.CreateThreadAndRunRequestToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearch? assistantFileSearch = default; + global::G.AssistantToolsFileSearch? fileSearch = default; if (discriminator?.Type == global::G.CreateThreadAndRunRequestToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearch)}"); - assistantFileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFunction? assistantFunction = default; + global::G.AssistantToolsFunction? function = default; if (discriminator?.Type == global::G.CreateThreadAndRunRequestToolDiscriminatorType.Function) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFunction)}"); - assistantFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + function = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem6( discriminator?.Type, - assistantCode, - assistantFileSearch, - assistantFunction + codeInterpreter, + fileSearch, + function ); return result; @@ -63,23 +63,23 @@ 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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearch) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearch), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearch).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } - else if (value.IsAssistantFunction) + else if (value.IsFunction) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFunction), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFunction).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Function, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem7.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem7.g.verified.cs index 9fffa4c8e3..3abbeb6d75 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem7.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem7.g.verified.cs @@ -22,25 +22,25 @@ public class ToolsItem7JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MessageObjectAttachmentToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.MessageObjectAttachmentToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly = default; + global::G.AssistantToolsFileSearchTypeOnly? fileSearch = default; if (discriminator?.Type == global::G.MessageObjectAttachmentToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearchTypeOnly)}"); - assistantFileSearchTypeOnly = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem7( discriminator?.Type, - assistantCode, - assistantFileSearchTypeOnly + codeInterpreter, + fileSearch ); return result; @@ -55,17 +55,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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearchTypeOnly) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearchTypeOnly).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearchTypeOnly, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem8.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem8.g.verified.cs index f87371ffe9..3230444183 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem8.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.ToolsItem8.g.verified.cs @@ -22,25 +22,25 @@ public class ToolsItem8JsonConverter : global::System.Text.Json.Serialization.Js throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateMessageRequestAttachmentToolDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.AssistantToolsCode? assistantCode = default; + global::G.AssistantToolsCode? codeInterpreter = default; if (discriminator?.Type == global::G.CreateMessageRequestAttachmentToolDiscriminatorType.CodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsCode)}"); - assistantCode = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + codeInterpreter = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantToolsFileSearchTypeOnly? assistantFileSearchTypeOnly = default; + global::G.AssistantToolsFileSearchTypeOnly? fileSearch = default; if (discriminator?.Type == global::G.CreateMessageRequestAttachmentToolDiscriminatorType.FileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantToolsFileSearchTypeOnly)}"); - assistantFileSearchTypeOnly = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ToolsItem8( discriminator?.Type, - assistantCode, - assistantFileSearchTypeOnly + codeInterpreter, + fileSearch ); return result; @@ -55,17 +55,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.IsAssistantCode) + if (value.IsCodeInterpreter) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsCode), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsCode).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantCode, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CodeInterpreter, typeInfo); } - else if (value.IsAssistantFileSearchTypeOnly) + else if (value.IsFileSearch) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantToolsFileSearchTypeOnly), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantToolsFileSearchTypeOnly).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantFileSearchTypeOnly, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.VectorStoreFileObjectChunkingStrategy.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.VectorStoreFileObjectChunkingStrategy.g.verified.cs index 3e7f89b3c1..8509f39118 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.VectorStoreFileObjectChunkingStrategy.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#JsonConverters.VectorStoreFileObjectChunkingStrategy.g.verified.cs @@ -22,25 +22,25 @@ public class VectorStoreFileObjectChunkingStrategyJsonConverter : global::System throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.VectorStoreFileObjectChunkingStrategyDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.StaticChunkingStrategyResponseParam? staticResponseParam = default; + global::G.StaticChunkingStrategyResponseParam? @static = default; if (discriminator?.Type == global::G.VectorStoreFileObjectChunkingStrategyDiscriminatorType.Static) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StaticChunkingStrategyResponseParam)}"); - staticResponseParam = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @static = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.OtherChunkingStrategyResponseParam? otherResponseParam = default; + global::G.OtherChunkingStrategyResponseParam? other = default; if (discriminator?.Type == global::G.VectorStoreFileObjectChunkingStrategyDiscriminatorType.Other) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.OtherChunkingStrategyResponseParam)}"); - otherResponseParam = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + other = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.VectorStoreFileObjectChunkingStrategy( discriminator?.Type, - staticResponseParam, - otherResponseParam + @static, + other ); return result; @@ -55,17 +55,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.IsStaticResponseParam) + if (value.IsStatic) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StaticChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StaticChunkingStrategyResponseParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StaticResponseParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Static, typeInfo); } - else if (value.IsOtherResponseParam) + else if (value.IsOther) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.OtherChunkingStrategyResponseParam), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.OtherChunkingStrategyResponseParam).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.OtherResponseParam, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Other, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.ContentChunk.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.ContentChunk.g.verified.cs index cb34c0ba79..5c4a8004be 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.ContentChunk.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.ContentChunk.g.verified.cs @@ -55,18 +55,18 @@ public ContentChunk(global::G.TextChunk? value) /// {"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0 /// #if NET6_0_OR_GREATER - public global::G.ImageURLChunk? ImageURL { get; init; } + public global::G.ImageURLChunk? ImageUrl { get; init; } #else - public global::G.ImageURLChunk? ImageURL { get; } + public global::G.ImageURLChunk? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageURL))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsImageURL => ImageURL != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,14 +76,14 @@ public ContentChunk(global::G.TextChunk? value) /// /// /// - public static implicit operator global::G.ImageURLChunk?(ContentChunk @this) => @this.ImageURL; + public static implicit operator global::G.ImageURLChunk?(ContentChunk @this) => @this.ImageUrl; /// /// /// public ContentChunk(global::G.ImageURLChunk? value) { - ImageURL = value; + ImageUrl = value; } /// @@ -92,20 +92,20 @@ public ContentChunk(global::G.ImageURLChunk? value) public ContentChunk( global::G.ContentChunkDiscriminatorType? type, global::G.TextChunk? text, - global::G.ImageURLChunk? imageURL + global::G.ImageURLChunk? imageUrl ) { Type = type; Text = text; - ImageURL = imageURL; + ImageUrl = imageUrl; } /// /// /// public object? Object => - ImageURL as object ?? + ImageUrl as object ?? Text as object ; @@ -114,7 +114,7 @@ Text as object /// public bool Validate() { - return IsText && !IsImageURL || !IsText && IsImageURL; + return IsText && !IsImageUrl || !IsText && IsImageUrl; } /// @@ -122,7 +122,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? imageURL = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -134,9 +134,9 @@ public bool Validate() { return text(Text!); } - else if (IsImageURL && imageURL != null) + else if (IsImageUrl && imageUrl != null) { - return imageURL(ImageURL!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -147,7 +147,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? imageURL = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -159,9 +159,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsImageURL) + else if (IsImageUrl) { - imageURL?.Invoke(ImageURL!); + imageUrl?.Invoke(ImageUrl!); } } @@ -174,7 +174,7 @@ public override int GetHashCode() { Text, typeof(global::G.TextChunk), - ImageURL, + ImageUrl, typeof(global::G.ImageURLChunk), }; const int offset = unchecked((int)2166136261); @@ -192,7 +192,7 @@ public bool Equals(ContentChunk other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageURL, other.ImageURL) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.DataItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.DataItem.g.verified.cs index 01b41f643c..3edfa27fd6 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.DataItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.DataItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.BaseModelCard? BaseModelCard { get; init; } + public global::G.BaseModelCard? Base { get; init; } #else - public global::G.BaseModelCard? BaseModelCard { get; } + public global::G.BaseModelCard? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BaseModelCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsBaseModelCard => BaseModelCard != null; + public bool IsBase => Base != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.BaseModelCard?(DataItem @this) => @this.BaseModelCard; + public static implicit operator global::G.BaseModelCard?(DataItem @this) => @this.Base; /// /// /// public DataItem(global::G.BaseModelCard? value) { - BaseModelCard = value; + Base = value; } /// /// Extra fields for fine-tuned models. /// #if NET6_0_OR_GREATER - public global::G.FTModelCard? FTModelCard { get; init; } + public global::G.FTModelCard? FineTuned { get; init; } #else - public global::G.FTModelCard? FTModelCard { get; } + public global::G.FTModelCard? FineTuned { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FTModelCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FineTuned))] #endif - public bool IsFTModelCard => FTModelCard != null; + public bool IsFineTuned => FineTuned != null; /// /// @@ -76,14 +76,14 @@ public DataItem(global::G.BaseModelCard? value) /// /// /// - public static implicit operator global::G.FTModelCard?(DataItem @this) => @this.FTModelCard; + public static implicit operator global::G.FTModelCard?(DataItem @this) => @this.FineTuned; /// /// /// public DataItem(global::G.FTModelCard? value) { - FTModelCard = value; + FineTuned = value; } /// @@ -91,22 +91,22 @@ public DataItem(global::G.FTModelCard? value) /// public DataItem( global::G.ModelListDataItemDiscriminatorType? type, - global::G.BaseModelCard? baseModelCard, - global::G.FTModelCard? fTModelCard + global::G.BaseModelCard? @base, + global::G.FTModelCard? fineTuned ) { Type = type; - BaseModelCard = baseModelCard; - FTModelCard = fTModelCard; + Base = @base; + FineTuned = fineTuned; } /// /// /// public object? Object => - FTModelCard as object ?? - BaseModelCard as object + FineTuned as object ?? + Base as object ; /// @@ -114,15 +114,15 @@ BaseModelCard as object /// public bool Validate() { - return IsBaseModelCard && !IsFTModelCard || !IsBaseModelCard && IsFTModelCard; + return IsBase && !IsFineTuned || !IsBase && IsFineTuned; } /// /// /// public TResult? Match( - global::System.Func? baseModelCard = null, - global::System.Func? fTModelCard = null, + global::System.Func? @base = null, + global::System.Func? fineTuned = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsBaseModelCard && baseModelCard != null) + if (IsBase && @base != null) { - return baseModelCard(BaseModelCard!); + return @base(Base!); } - else if (IsFTModelCard && fTModelCard != null) + else if (IsFineTuned && fineTuned != null) { - return fTModelCard(FTModelCard!); + return fineTuned(FineTuned!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? baseModelCard = null, - global::System.Action? fTModelCard = null, + global::System.Action? @base = null, + global::System.Action? fineTuned = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsBaseModelCard) + if (IsBase) { - baseModelCard?.Invoke(BaseModelCard!); + @base?.Invoke(Base!); } - else if (IsFTModelCard) + else if (IsFineTuned) { - fTModelCard?.Invoke(FTModelCard!); + fineTuned?.Invoke(FineTuned!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - BaseModelCard, + Base, typeof(global::G.BaseModelCard), - FTModelCard, + FineTuned, typeof(global::G.FTModelCard), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(DataItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(BaseModelCard, other.BaseModelCard) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FTModelCard, other.FTModelCard) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FineTuned, other.FineTuned) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem.g.verified.cs index 5dc93f49df..fac880058c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; init; } + public global::G.WandbIntegrationOut? Wandb { get; init; } #else - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; } + public global::G.WandbIntegrationOut? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegrationOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegrationOut => WandbIntegrationOut != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem @this) => @this.WandbIntegrationOut; + public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem @this) => @this.Wandb; /// /// /// public IntegrationsItem(global::G.WandbIntegrationOut? value) { - WandbIntegrationOut = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem(global::G.WandbIntegrationOut? value) /// public IntegrationsItem( global::G.DetailedJobOutIntegrationDiscriminatorType? type, - global::G.WandbIntegrationOut? wandbIntegrationOut + global::G.WandbIntegrationOut? wandb ) { Type = type; - WandbIntegrationOut = wandbIntegrationOut; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegrationOut as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegrationOut as object /// public bool Validate() { - return IsWandbIntegrationOut; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegrationOut = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegrationOut && wandbIntegrationOut != null) + if (IsWandb && wandb != null) { - return wandbIntegrationOut(WandbIntegrationOut!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegrationOut = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegrationOut) + if (IsWandb) { - wandbIntegrationOut?.Invoke(WandbIntegrationOut!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegrationOut, + Wandb, typeof(global::G.WandbIntegrationOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegrationOut, other.WandbIntegrationOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem2.g.verified.cs index 66853eba01..8572f46c4c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegration? WandbIntegration { get; init; } + public global::G.WandbIntegration? Wandb { get; init; } #else - public global::G.WandbIntegration? WandbIntegration { get; } + public global::G.WandbIntegration? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegration))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegration => WandbIntegration != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegration?(IntegrationsItem2 @this) => @this.WandbIntegration; + public static implicit operator global::G.WandbIntegration?(IntegrationsItem2 @this) => @this.Wandb; /// /// /// public IntegrationsItem2(global::G.WandbIntegration? value) { - WandbIntegration = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem2(global::G.WandbIntegration? value) /// public IntegrationsItem2( global::G.JobInIntegrationDiscriminatorType? type, - global::G.WandbIntegration? wandbIntegration + global::G.WandbIntegration? wandb ) { Type = type; - WandbIntegration = wandbIntegration; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegration as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegration as object /// public bool Validate() { - return IsWandbIntegration; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegration = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegration && wandbIntegration != null) + if (IsWandb && wandb != null) { - return wandbIntegration(WandbIntegration!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegration = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegration) + if (IsWandb) { - wandbIntegration?.Invoke(WandbIntegration!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegration, + Wandb, typeof(global::G.WandbIntegration), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegration, other.WandbIntegration) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem3.g.verified.cs index bd17cf72bf..64473570fa 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.IntegrationsItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; init; } + public global::G.WandbIntegrationOut? Wandb { get; init; } #else - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; } + public global::G.WandbIntegrationOut? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegrationOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegrationOut => WandbIntegrationOut != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem3 @this) => @this.WandbIntegrationOut; + public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem3 @this) => @this.Wandb; /// /// /// public IntegrationsItem3(global::G.WandbIntegrationOut? value) { - WandbIntegrationOut = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem3(global::G.WandbIntegrationOut? value) /// public IntegrationsItem3( global::G.JobOutIntegrationDiscriminatorType? type, - global::G.WandbIntegrationOut? wandbIntegrationOut + global::G.WandbIntegrationOut? wandb ) { Type = type; - WandbIntegrationOut = wandbIntegrationOut; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegrationOut as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegrationOut as object /// public bool Validate() { - return IsWandbIntegrationOut; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegrationOut = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegrationOut && wandbIntegrationOut != null) + if (IsWandb && wandb != null) { - return wandbIntegrationOut(WandbIntegrationOut!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegrationOut = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegrationOut) + if (IsWandb) { - wandbIntegrationOut?.Invoke(WandbIntegrationOut!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegrationOut, + Wandb, typeof(global::G.WandbIntegrationOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegrationOut, other.WandbIntegrationOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs index 97ec82f0e5..647befb725 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.User; /// /// /// public MessagesItem(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.Assistant; /// /// /// public MessagesItem(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -111,14 +111,14 @@ public MessagesItem(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.Tool; /// /// /// public MessagesItem(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// @@ -126,25 +126,25 @@ public MessagesItem(global::G.ToolMessage? value) /// public MessagesItem( global::G.AgentsCompletionRequestMessageDiscriminatorRole? role, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool ) { Role = role; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; + User = user; + Assistant = assistant; + Tool = tool; } /// /// /// public object? Object => - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object + Tool as object ?? + Assistant as object ?? + User as object ; /// @@ -152,16 +152,16 @@ UserMessage as object /// public bool Validate() { - return IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsUserMessage && IsAssistantMessage && !IsToolMessage || !IsUserMessage && !IsAssistantMessage && IsToolMessage; + return IsUser && !IsAssistant && !IsTool || !IsUser && IsAssistant && !IsTool || !IsUser && !IsAssistant && IsTool; } /// /// /// public TResult? Match( - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsUserMessage && userMessage != null) + if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsUserMessage) + if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem2.g.verified.cs index 4ca47dcd10..c408c30bc8 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.MessagesItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.SystemMessage? SystemMessage { get; init; } + public global::G.SystemMessage? System { get; init; } #else - public global::G.SystemMessage? SystemMessage { get; } + public global::G.SystemMessage? System { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(System))] #endif - public bool IsSystemMessage => SystemMessage != null; + public bool IsSystem => System != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.SystemMessage?(MessagesItem2 @this) => @this.SystemMessage; + public static implicit operator global::G.SystemMessage?(MessagesItem2 @this) => @this.System; /// /// /// public MessagesItem2(global::G.SystemMessage? value) { - SystemMessage = value; + System = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem2(global::G.SystemMessage? value) /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem2 @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem2 @this) => @this.User; /// /// /// public MessagesItem2(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -111,32 +111,32 @@ public MessagesItem2(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem2 @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem2 @this) => @this.Assistant; /// /// /// public MessagesItem2(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -146,14 +146,14 @@ public MessagesItem2(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem2 @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem2 @this) => @this.Tool; /// /// /// public MessagesItem2(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// @@ -161,28 +161,28 @@ public MessagesItem2(global::G.ToolMessage? value) /// public MessagesItem2( global::G.ChatCompletionRequestMessageDiscriminatorRole? role, - global::G.SystemMessage? systemMessage, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage + global::G.SystemMessage? system, + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool ) { Role = role; - SystemMessage = systemMessage; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; + System = system; + User = user; + Assistant = assistant; + Tool = tool; } /// /// /// public object? Object => - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object ?? - SystemMessage as object + Tool as object ?? + Assistant as object ?? + User as object ?? + System as object ; /// @@ -190,17 +190,17 @@ SystemMessage as object /// public bool Validate() { - return IsSystemMessage && !IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsSystemMessage && IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsSystemMessage && !IsUserMessage && IsAssistantMessage && !IsToolMessage || !IsSystemMessage && !IsUserMessage && !IsAssistantMessage && IsToolMessage; + return IsSystem && !IsUser && !IsAssistant && !IsTool || !IsSystem && IsUser && !IsAssistant && !IsTool || !IsSystem && !IsUser && IsAssistant && !IsTool || !IsSystem && !IsUser && !IsAssistant && IsTool; } /// /// /// public TResult? Match( - global::System.Func? systemMessage = null, - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, + global::System.Func? system = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsSystemMessage && systemMessage != null) + if (IsSystem && system != null) { - return systemMessage(SystemMessage!); + return system(System!); } - else if (IsUserMessage && userMessage != null) + else if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? systemMessage = null, - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, + global::System.Action? system = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsSystemMessage) + if (IsSystem) { - systemMessage?.Invoke(SystemMessage!); + system?.Invoke(System!); } - else if (IsUserMessage) + else if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - SystemMessage, + System, typeof(global::G.SystemMessage), - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(System, other.System) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem.g.verified.cs index a0135f897e..2aadf23bdc 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; init; } + public global::G.GithubRepositoryOut? Github { get; init; } #else - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; } + public global::G.GithubRepositoryOut? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryOut => GithubRepositoryOut != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem @this) => @this.GithubRepositoryOut; + public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem @this) => @this.Github; /// /// /// public RepositoriesItem(global::G.GithubRepositoryOut? value) { - GithubRepositoryOut = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem(global::G.GithubRepositoryOut? value) /// public RepositoriesItem( global::G.DetailedJobOutRepositorieDiscriminatorType? type, - global::G.GithubRepositoryOut? githubRepositoryOut + global::G.GithubRepositoryOut? github ) { Type = type; - GithubRepositoryOut = githubRepositoryOut; + Github = github; } /// /// /// public object? Object => - GithubRepositoryOut as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryOut as object /// public bool Validate() { - return IsGithubRepositoryOut; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryOut = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryOut && githubRepositoryOut != null) + if (IsGithub && github != null) { - return githubRepositoryOut(GithubRepositoryOut!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryOut = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryOut) + if (IsGithub) { - githubRepositoryOut?.Invoke(GithubRepositoryOut!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryOut, + Github, typeof(global::G.GithubRepositoryOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryOut, other.GithubRepositoryOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem2.g.verified.cs index 7b5a881bed..27689472d7 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryIn? GithubRepositoryIn { get; init; } + public global::G.GithubRepositoryIn? Github { get; init; } #else - public global::G.GithubRepositoryIn? GithubRepositoryIn { get; } + public global::G.GithubRepositoryIn? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryIn))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryIn => GithubRepositoryIn != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryIn?(RepositoriesItem2 @this) => @this.GithubRepositoryIn; + public static implicit operator global::G.GithubRepositoryIn?(RepositoriesItem2 @this) => @this.Github; /// /// /// public RepositoriesItem2(global::G.GithubRepositoryIn? value) { - GithubRepositoryIn = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem2(global::G.GithubRepositoryIn? value) /// public RepositoriesItem2( global::G.JobInRepositorieDiscriminatorType? type, - global::G.GithubRepositoryIn? githubRepositoryIn + global::G.GithubRepositoryIn? github ) { Type = type; - GithubRepositoryIn = githubRepositoryIn; + Github = github; } /// /// /// public object? Object => - GithubRepositoryIn as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryIn as object /// public bool Validate() { - return IsGithubRepositoryIn; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryIn = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryIn && githubRepositoryIn != null) + if (IsGithub && github != null) { - return githubRepositoryIn(GithubRepositoryIn!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryIn = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryIn) + if (IsGithub) { - githubRepositoryIn?.Invoke(GithubRepositoryIn!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryIn, + Github, typeof(global::G.GithubRepositoryIn), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryIn, other.GithubRepositoryIn) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem3.g.verified.cs index 988a04e594..47ea082e3b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RepositoriesItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; init; } + public global::G.GithubRepositoryOut? Github { get; init; } #else - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; } + public global::G.GithubRepositoryOut? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryOut => GithubRepositoryOut != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem3 @this) => @this.GithubRepositoryOut; + public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem3 @this) => @this.Github; /// /// /// public RepositoriesItem3(global::G.GithubRepositoryOut? value) { - GithubRepositoryOut = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem3(global::G.GithubRepositoryOut? value) /// public RepositoriesItem3( global::G.JobOutRepositorieDiscriminatorType? type, - global::G.GithubRepositoryOut? githubRepositoryOut + global::G.GithubRepositoryOut? github ) { Type = type; - GithubRepositoryOut = githubRepositoryOut; + Github = github; } /// /// /// public object? Object => - GithubRepositoryOut as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryOut as object /// public bool Validate() { - return IsGithubRepositoryOut; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryOut = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryOut && githubRepositoryOut != null) + if (IsGithub && github != null) { - return githubRepositoryOut(GithubRepositoryOut!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryOut = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryOut) + if (IsGithub) { - githubRepositoryOut?.Invoke(GithubRepositoryOut!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryOut, + Github, typeof(global::G.GithubRepositoryOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryOut, other.GithubRepositoryOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs index 14b35780ce..8164c8cf2a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/NewtonsoftJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.BaseModelCard? BaseCard { get; init; } + public global::G.BaseModelCard? Base { get; init; } #else - public global::G.BaseModelCard? BaseCard { get; } + public global::G.BaseModelCard? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BaseCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsBaseCard => BaseCard != null; + public bool IsBase => Base != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.BaseModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.BaseCard; + public static implicit operator global::G.BaseModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.Base; /// /// /// public RetrieveModelV1ModelsModelIdGetResponse(global::G.BaseModelCard? value) { - BaseCard = value; + Base = value; } /// /// Extra fields for fine-tuned models. /// #if NET6_0_OR_GREATER - public global::G.FTModelCard? FTCard { get; init; } + public global::G.FTModelCard? FineTuned { get; init; } #else - public global::G.FTModelCard? FTCard { get; } + public global::G.FTModelCard? FineTuned { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FTCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FineTuned))] #endif - public bool IsFTCard => FTCard != null; + public bool IsFineTuned => FineTuned != null; /// /// @@ -76,14 +76,14 @@ public RetrieveModelV1ModelsModelIdGetResponse(global::G.BaseModelCard? value) /// /// /// - public static implicit operator global::G.FTModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.FTCard; + public static implicit operator global::G.FTModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.FineTuned; /// /// /// public RetrieveModelV1ModelsModelIdGetResponse(global::G.FTModelCard? value) { - FTCard = value; + FineTuned = value; } /// @@ -91,22 +91,22 @@ public RetrieveModelV1ModelsModelIdGetResponse(global::G.FTModelCard? value) /// public RetrieveModelV1ModelsModelIdGetResponse( global::G.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType? type, - global::G.BaseModelCard? baseCard, - global::G.FTModelCard? fTCard + global::G.BaseModelCard? @base, + global::G.FTModelCard? fineTuned ) { Type = type; - BaseCard = baseCard; - FTCard = fTCard; + Base = @base; + FineTuned = fineTuned; } /// /// /// public object? Object => - FTCard as object ?? - BaseCard as object + FineTuned as object ?? + Base as object ; /// @@ -114,15 +114,15 @@ BaseCard as object /// public bool Validate() { - return IsBaseCard && !IsFTCard || !IsBaseCard && IsFTCard; + return IsBase && !IsFineTuned || !IsBase && IsFineTuned; } /// /// /// public TResult? Match( - global::System.Func? baseCard = null, - global::System.Func? fTCard = null, + global::System.Func? @base = null, + global::System.Func? fineTuned = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsBaseCard && baseCard != null) + if (IsBase && @base != null) { - return baseCard(BaseCard!); + return @base(Base!); } - else if (IsFTCard && fTCard != null) + else if (IsFineTuned && fineTuned != null) { - return fTCard(FTCard!); + return fineTuned(FineTuned!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? baseCard = null, - global::System.Action? fTCard = null, + global::System.Action? @base = null, + global::System.Action? fineTuned = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsBaseCard) + if (IsBase) { - baseCard?.Invoke(BaseCard!); + @base?.Invoke(Base!); } - else if (IsFTCard) + else if (IsFineTuned) { - fTCard?.Invoke(FTCard!); + fineTuned?.Invoke(FineTuned!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - BaseCard, + Base, typeof(global::G.BaseModelCard), - FTCard, + FineTuned, typeof(global::G.FTModelCard), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RetrieveModelV1ModelsModelIdGetResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(BaseCard, other.BaseCard) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FTCard, other.FTCard) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FineTuned, other.FineTuned) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.ContentChunk.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.ContentChunk.g.verified.cs index 8fbbc32370..6fbfaa617f 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.ContentChunk.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.ContentChunk.g.verified.cs @@ -55,18 +55,18 @@ public ContentChunk(global::G.TextChunk? value) /// {"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0 /// #if NET6_0_OR_GREATER - public global::G.ImageURLChunk? ImageURL { get; init; } + public global::G.ImageURLChunk? ImageUrl { get; init; } #else - public global::G.ImageURLChunk? ImageURL { get; } + public global::G.ImageURLChunk? ImageUrl { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageURL))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ImageUrl))] #endif - public bool IsImageURL => ImageURL != null; + public bool IsImageUrl => ImageUrl != null; /// /// @@ -76,14 +76,14 @@ public ContentChunk(global::G.TextChunk? value) /// /// /// - public static implicit operator global::G.ImageURLChunk?(ContentChunk @this) => @this.ImageURL; + public static implicit operator global::G.ImageURLChunk?(ContentChunk @this) => @this.ImageUrl; /// /// /// public ContentChunk(global::G.ImageURLChunk? value) { - ImageURL = value; + ImageUrl = value; } /// @@ -92,20 +92,20 @@ public ContentChunk(global::G.ImageURLChunk? value) public ContentChunk( global::G.ContentChunkDiscriminatorType? type, global::G.TextChunk? text, - global::G.ImageURLChunk? imageURL + global::G.ImageURLChunk? imageUrl ) { Type = type; Text = text; - ImageURL = imageURL; + ImageUrl = imageUrl; } /// /// /// public object? Object => - ImageURL as object ?? + ImageUrl as object ?? Text as object ; @@ -114,7 +114,7 @@ Text as object /// public bool Validate() { - return IsText && !IsImageURL || !IsText && IsImageURL; + return IsText && !IsImageUrl || !IsText && IsImageUrl; } /// @@ -122,7 +122,7 @@ public bool Validate() /// public TResult? Match( global::System.Func? text = null, - global::System.Func? imageURL = null, + global::System.Func? imageUrl = null, bool validate = true) { if (validate) @@ -134,9 +134,9 @@ public bool Validate() { return text(Text!); } - else if (IsImageURL && imageURL != null) + else if (IsImageUrl && imageUrl != null) { - return imageURL(ImageURL!); + return imageUrl(ImageUrl!); } return default(TResult); @@ -147,7 +147,7 @@ public bool Validate() /// public void Match( global::System.Action? text = null, - global::System.Action? imageURL = null, + global::System.Action? imageUrl = null, bool validate = true) { if (validate) @@ -159,9 +159,9 @@ public void Match( { text?.Invoke(Text!); } - else if (IsImageURL) + else if (IsImageUrl) { - imageURL?.Invoke(ImageURL!); + imageUrl?.Invoke(ImageUrl!); } } @@ -174,7 +174,7 @@ public override int GetHashCode() { Text, typeof(global::G.TextChunk), - ImageURL, + ImageUrl, typeof(global::G.ImageURLChunk), }; const int offset = unchecked((int)2166136261); @@ -192,7 +192,7 @@ public bool Equals(ContentChunk other) { return global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageURL, other.ImageURL) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ImageUrl, other.ImageUrl) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.DataItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.DataItem.g.verified.cs index 2667fee694..afe17fd0c3 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.DataItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.DataItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.BaseModelCard? BaseModelCard { get; init; } + public global::G.BaseModelCard? Base { get; init; } #else - public global::G.BaseModelCard? BaseModelCard { get; } + public global::G.BaseModelCard? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BaseModelCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsBaseModelCard => BaseModelCard != null; + public bool IsBase => Base != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.BaseModelCard?(DataItem @this) => @this.BaseModelCard; + public static implicit operator global::G.BaseModelCard?(DataItem @this) => @this.Base; /// /// /// public DataItem(global::G.BaseModelCard? value) { - BaseModelCard = value; + Base = value; } /// /// Extra fields for fine-tuned models. /// #if NET6_0_OR_GREATER - public global::G.FTModelCard? FTModelCard { get; init; } + public global::G.FTModelCard? FineTuned { get; init; } #else - public global::G.FTModelCard? FTModelCard { get; } + public global::G.FTModelCard? FineTuned { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FTModelCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FineTuned))] #endif - public bool IsFTModelCard => FTModelCard != null; + public bool IsFineTuned => FineTuned != null; /// /// @@ -76,14 +76,14 @@ public DataItem(global::G.BaseModelCard? value) /// /// /// - public static implicit operator global::G.FTModelCard?(DataItem @this) => @this.FTModelCard; + public static implicit operator global::G.FTModelCard?(DataItem @this) => @this.FineTuned; /// /// /// public DataItem(global::G.FTModelCard? value) { - FTModelCard = value; + FineTuned = value; } /// @@ -91,22 +91,22 @@ public DataItem(global::G.FTModelCard? value) /// public DataItem( global::G.ModelListDataItemDiscriminatorType? type, - global::G.BaseModelCard? baseModelCard, - global::G.FTModelCard? fTModelCard + global::G.BaseModelCard? @base, + global::G.FTModelCard? fineTuned ) { Type = type; - BaseModelCard = baseModelCard; - FTModelCard = fTModelCard; + Base = @base; + FineTuned = fineTuned; } /// /// /// public object? Object => - FTModelCard as object ?? - BaseModelCard as object + FineTuned as object ?? + Base as object ; /// @@ -114,15 +114,15 @@ BaseModelCard as object /// public bool Validate() { - return IsBaseModelCard && !IsFTModelCard || !IsBaseModelCard && IsFTModelCard; + return IsBase && !IsFineTuned || !IsBase && IsFineTuned; } /// /// /// public TResult? Match( - global::System.Func? baseModelCard = null, - global::System.Func? fTModelCard = null, + global::System.Func? @base = null, + global::System.Func? fineTuned = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsBaseModelCard && baseModelCard != null) + if (IsBase && @base != null) { - return baseModelCard(BaseModelCard!); + return @base(Base!); } - else if (IsFTModelCard && fTModelCard != null) + else if (IsFineTuned && fineTuned != null) { - return fTModelCard(FTModelCard!); + return fineTuned(FineTuned!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? baseModelCard = null, - global::System.Action? fTModelCard = null, + global::System.Action? @base = null, + global::System.Action? fineTuned = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsBaseModelCard) + if (IsBase) { - baseModelCard?.Invoke(BaseModelCard!); + @base?.Invoke(Base!); } - else if (IsFTModelCard) + else if (IsFineTuned) { - fTModelCard?.Invoke(FTModelCard!); + fineTuned?.Invoke(FineTuned!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - BaseModelCard, + Base, typeof(global::G.BaseModelCard), - FTModelCard, + FineTuned, typeof(global::G.FTModelCard), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(DataItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(BaseModelCard, other.BaseModelCard) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FTModelCard, other.FTModelCard) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FineTuned, other.FineTuned) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem.g.verified.cs index 1182e9b66e..b06df99a4c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; init; } + public global::G.WandbIntegrationOut? Wandb { get; init; } #else - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; } + public global::G.WandbIntegrationOut? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegrationOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegrationOut => WandbIntegrationOut != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem @this) => @this.WandbIntegrationOut; + public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem @this) => @this.Wandb; /// /// /// public IntegrationsItem(global::G.WandbIntegrationOut? value) { - WandbIntegrationOut = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem(global::G.WandbIntegrationOut? value) /// public IntegrationsItem( global::G.DetailedJobOutIntegrationDiscriminatorType? type, - global::G.WandbIntegrationOut? wandbIntegrationOut + global::G.WandbIntegrationOut? wandb ) { Type = type; - WandbIntegrationOut = wandbIntegrationOut; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegrationOut as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegrationOut as object /// public bool Validate() { - return IsWandbIntegrationOut; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegrationOut = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegrationOut && wandbIntegrationOut != null) + if (IsWandb && wandb != null) { - return wandbIntegrationOut(WandbIntegrationOut!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegrationOut = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegrationOut) + if (IsWandb) { - wandbIntegrationOut?.Invoke(WandbIntegrationOut!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegrationOut, + Wandb, typeof(global::G.WandbIntegrationOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegrationOut, other.WandbIntegrationOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem2.g.verified.cs index 0d2111bc96..308a4f8211 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegration? WandbIntegration { get; init; } + public global::G.WandbIntegration? Wandb { get; init; } #else - public global::G.WandbIntegration? WandbIntegration { get; } + public global::G.WandbIntegration? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegration))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegration => WandbIntegration != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegration?(IntegrationsItem2 @this) => @this.WandbIntegration; + public static implicit operator global::G.WandbIntegration?(IntegrationsItem2 @this) => @this.Wandb; /// /// /// public IntegrationsItem2(global::G.WandbIntegration? value) { - WandbIntegration = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem2(global::G.WandbIntegration? value) /// public IntegrationsItem2( global::G.JobInIntegrationDiscriminatorType? type, - global::G.WandbIntegration? wandbIntegration + global::G.WandbIntegration? wandb ) { Type = type; - WandbIntegration = wandbIntegration; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegration as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegration as object /// public bool Validate() { - return IsWandbIntegration; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegration = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegration && wandbIntegration != null) + if (IsWandb && wandb != null) { - return wandbIntegration(WandbIntegration!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegration = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegration) + if (IsWandb) { - wandbIntegration?.Invoke(WandbIntegration!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegration, + Wandb, typeof(global::G.WandbIntegration), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegration, other.WandbIntegration) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem3.g.verified.cs index 8e9414ffb1..07055c4d7e 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.IntegrationsItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; init; } + public global::G.WandbIntegrationOut? Wandb { get; init; } #else - public global::G.WandbIntegrationOut? WandbIntegrationOut { get; } + public global::G.WandbIntegrationOut? Wandb { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WandbIntegrationOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Wandb))] #endif - public bool IsWandbIntegrationOut => WandbIntegrationOut != null; + public bool IsWandb => Wandb != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem3 @this) => @this.WandbIntegrationOut; + public static implicit operator global::G.WandbIntegrationOut?(IntegrationsItem3 @this) => @this.Wandb; /// /// /// public IntegrationsItem3(global::G.WandbIntegrationOut? value) { - WandbIntegrationOut = value; + Wandb = value; } /// @@ -56,19 +56,19 @@ public IntegrationsItem3(global::G.WandbIntegrationOut? value) /// public IntegrationsItem3( global::G.JobOutIntegrationDiscriminatorType? type, - global::G.WandbIntegrationOut? wandbIntegrationOut + global::G.WandbIntegrationOut? wandb ) { Type = type; - WandbIntegrationOut = wandbIntegrationOut; + Wandb = wandb; } /// /// /// public object? Object => - WandbIntegrationOut as object + Wandb as object ; /// @@ -76,14 +76,14 @@ WandbIntegrationOut as object /// public bool Validate() { - return IsWandbIntegrationOut; + return IsWandb; } /// /// /// public TResult? Match( - global::System.Func? wandbIntegrationOut = null, + global::System.Func? wandb = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsWandbIntegrationOut && wandbIntegrationOut != null) + if (IsWandb && wandb != null) { - return wandbIntegrationOut(WandbIntegrationOut!); + return wandb(Wandb!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? wandbIntegrationOut = null, + global::System.Action? wandb = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsWandbIntegrationOut) + if (IsWandb) { - wandbIntegrationOut?.Invoke(WandbIntegrationOut!); + wandb?.Invoke(Wandb!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - WandbIntegrationOut, + Wandb, typeof(global::G.WandbIntegrationOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(IntegrationsItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(WandbIntegrationOut, other.WandbIntegrationOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Wandb, other.Wandb) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs index 827e4915ee..7367f7086a 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem @this) => @this.User; /// /// /// public MessagesItem(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem @this) => @this.Assistant; /// /// /// public MessagesItem(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -111,14 +111,14 @@ public MessagesItem(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem @this) => @this.Tool; /// /// /// public MessagesItem(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// @@ -126,25 +126,25 @@ public MessagesItem(global::G.ToolMessage? value) /// public MessagesItem( global::G.AgentsCompletionRequestMessageDiscriminatorRole? role, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool ) { Role = role; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; + User = user; + Assistant = assistant; + Tool = tool; } /// /// /// public object? Object => - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object + Tool as object ?? + Assistant as object ?? + User as object ; /// @@ -152,16 +152,16 @@ UserMessage as object /// public bool Validate() { - return IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsUserMessage && IsAssistantMessage && !IsToolMessage || !IsUserMessage && !IsAssistantMessage && IsToolMessage; + return IsUser && !IsAssistant && !IsTool || !IsUser && IsAssistant && !IsTool || !IsUser && !IsAssistant && IsTool; } /// /// /// public TResult? Match( - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, bool validate = true) { if (validate) @@ -169,17 +169,17 @@ public bool Validate() Validate(); } - if (IsUserMessage && userMessage != null) + if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } return default(TResult); @@ -189,9 +189,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, bool validate = true) { if (validate) @@ -199,17 +199,17 @@ public void Match( Validate(); } - if (IsUserMessage) + if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } } @@ -220,11 +220,11 @@ public override int GetHashCode() { var fields = new object?[] { - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), }; const int offset = unchecked((int)2166136261); @@ -241,9 +241,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem2.g.verified.cs index 357ecb56e6..726c7f70e4 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.MessagesItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.SystemMessage? SystemMessage { get; init; } + public global::G.SystemMessage? System { get; init; } #else - public global::G.SystemMessage? SystemMessage { get; } + public global::G.SystemMessage? System { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SystemMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(System))] #endif - public bool IsSystemMessage => SystemMessage != null; + public bool IsSystem => System != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.SystemMessage?(MessagesItem2 @this) => @this.SystemMessage; + public static implicit operator global::G.SystemMessage?(MessagesItem2 @this) => @this.System; /// /// /// public MessagesItem2(global::G.SystemMessage? value) { - SystemMessage = value; + System = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.UserMessage? UserMessage { get; init; } + public global::G.UserMessage? User { get; init; } #else - public global::G.UserMessage? UserMessage { get; } + public global::G.UserMessage? User { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(User))] #endif - public bool IsUserMessage => UserMessage != null; + public bool IsUser => User != null; /// /// @@ -76,32 +76,32 @@ public MessagesItem2(global::G.SystemMessage? value) /// /// /// - public static implicit operator global::G.UserMessage?(MessagesItem2 @this) => @this.UserMessage; + public static implicit operator global::G.UserMessage?(MessagesItem2 @this) => @this.User; /// /// /// public MessagesItem2(global::G.UserMessage? value) { - UserMessage = value; + User = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.AssistantMessage? AssistantMessage { get; init; } + public global::G.AssistantMessage? Assistant { get; init; } #else - public global::G.AssistantMessage? AssistantMessage { get; } + public global::G.AssistantMessage? Assistant { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AssistantMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Assistant))] #endif - public bool IsAssistantMessage => AssistantMessage != null; + public bool IsAssistant => Assistant != null; /// /// @@ -111,32 +111,32 @@ public MessagesItem2(global::G.UserMessage? value) /// /// /// - public static implicit operator global::G.AssistantMessage?(MessagesItem2 @this) => @this.AssistantMessage; + public static implicit operator global::G.AssistantMessage?(MessagesItem2 @this) => @this.Assistant; /// /// /// public MessagesItem2(global::G.AssistantMessage? value) { - AssistantMessage = value; + Assistant = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.ToolMessage? ToolMessage { get; init; } + public global::G.ToolMessage? Tool { get; init; } #else - public global::G.ToolMessage? ToolMessage { get; } + public global::G.ToolMessage? Tool { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ToolMessage))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Tool))] #endif - public bool IsToolMessage => ToolMessage != null; + public bool IsTool => Tool != null; /// /// @@ -146,14 +146,14 @@ public MessagesItem2(global::G.AssistantMessage? value) /// /// /// - public static implicit operator global::G.ToolMessage?(MessagesItem2 @this) => @this.ToolMessage; + public static implicit operator global::G.ToolMessage?(MessagesItem2 @this) => @this.Tool; /// /// /// public MessagesItem2(global::G.ToolMessage? value) { - ToolMessage = value; + Tool = value; } /// @@ -161,28 +161,28 @@ public MessagesItem2(global::G.ToolMessage? value) /// public MessagesItem2( global::G.ChatCompletionRequestMessageDiscriminatorRole? role, - global::G.SystemMessage? systemMessage, - global::G.UserMessage? userMessage, - global::G.AssistantMessage? assistantMessage, - global::G.ToolMessage? toolMessage + global::G.SystemMessage? system, + global::G.UserMessage? user, + global::G.AssistantMessage? assistant, + global::G.ToolMessage? tool ) { Role = role; - SystemMessage = systemMessage; - UserMessage = userMessage; - AssistantMessage = assistantMessage; - ToolMessage = toolMessage; + System = system; + User = user; + Assistant = assistant; + Tool = tool; } /// /// /// public object? Object => - ToolMessage as object ?? - AssistantMessage as object ?? - UserMessage as object ?? - SystemMessage as object + Tool as object ?? + Assistant as object ?? + User as object ?? + System as object ; /// @@ -190,17 +190,17 @@ SystemMessage as object /// public bool Validate() { - return IsSystemMessage && !IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsSystemMessage && IsUserMessage && !IsAssistantMessage && !IsToolMessage || !IsSystemMessage && !IsUserMessage && IsAssistantMessage && !IsToolMessage || !IsSystemMessage && !IsUserMessage && !IsAssistantMessage && IsToolMessage; + return IsSystem && !IsUser && !IsAssistant && !IsTool || !IsSystem && IsUser && !IsAssistant && !IsTool || !IsSystem && !IsUser && IsAssistant && !IsTool || !IsSystem && !IsUser && !IsAssistant && IsTool; } /// /// /// public TResult? Match( - global::System.Func? systemMessage = null, - global::System.Func? userMessage = null, - global::System.Func? assistantMessage = null, - global::System.Func? toolMessage = null, + global::System.Func? system = null, + global::System.Func? user = null, + global::System.Func? assistant = null, + global::System.Func? tool = null, bool validate = true) { if (validate) @@ -208,21 +208,21 @@ public bool Validate() Validate(); } - if (IsSystemMessage && systemMessage != null) + if (IsSystem && system != null) { - return systemMessage(SystemMessage!); + return system(System!); } - else if (IsUserMessage && userMessage != null) + else if (IsUser && user != null) { - return userMessage(UserMessage!); + return user(User!); } - else if (IsAssistantMessage && assistantMessage != null) + else if (IsAssistant && assistant != null) { - return assistantMessage(AssistantMessage!); + return assistant(Assistant!); } - else if (IsToolMessage && toolMessage != null) + else if (IsTool && tool != null) { - return toolMessage(ToolMessage!); + return tool(Tool!); } return default(TResult); @@ -232,10 +232,10 @@ public bool Validate() /// /// public void Match( - global::System.Action? systemMessage = null, - global::System.Action? userMessage = null, - global::System.Action? assistantMessage = null, - global::System.Action? toolMessage = null, + global::System.Action? system = null, + global::System.Action? user = null, + global::System.Action? assistant = null, + global::System.Action? tool = null, bool validate = true) { if (validate) @@ -243,21 +243,21 @@ public void Match( Validate(); } - if (IsSystemMessage) + if (IsSystem) { - systemMessage?.Invoke(SystemMessage!); + system?.Invoke(System!); } - else if (IsUserMessage) + else if (IsUser) { - userMessage?.Invoke(UserMessage!); + user?.Invoke(User!); } - else if (IsAssistantMessage) + else if (IsAssistant) { - assistantMessage?.Invoke(AssistantMessage!); + assistant?.Invoke(Assistant!); } - else if (IsToolMessage) + else if (IsTool) { - toolMessage?.Invoke(ToolMessage!); + tool?.Invoke(Tool!); } } @@ -268,13 +268,13 @@ public override int GetHashCode() { var fields = new object?[] { - SystemMessage, + System, typeof(global::G.SystemMessage), - UserMessage, + User, typeof(global::G.UserMessage), - AssistantMessage, + Assistant, typeof(global::G.AssistantMessage), - ToolMessage, + Tool, typeof(global::G.ToolMessage), }; const int offset = unchecked((int)2166136261); @@ -291,10 +291,10 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(MessagesItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(SystemMessage, other.SystemMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserMessage, other.UserMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(AssistantMessage, other.AssistantMessage) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(ToolMessage, other.ToolMessage) + global::System.Collections.Generic.EqualityComparer.Default.Equals(System, other.System) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(User, other.User) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Assistant, other.Assistant) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Tool, other.Tool) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem.g.verified.cs index 10cbcc3747..82f1e11d08 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; init; } + public global::G.GithubRepositoryOut? Github { get; init; } #else - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; } + public global::G.GithubRepositoryOut? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryOut => GithubRepositoryOut != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem @this) => @this.GithubRepositoryOut; + public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem @this) => @this.Github; /// /// /// public RepositoriesItem(global::G.GithubRepositoryOut? value) { - GithubRepositoryOut = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem(global::G.GithubRepositoryOut? value) /// public RepositoriesItem( global::G.DetailedJobOutRepositorieDiscriminatorType? type, - global::G.GithubRepositoryOut? githubRepositoryOut + global::G.GithubRepositoryOut? github ) { Type = type; - GithubRepositoryOut = githubRepositoryOut; + Github = github; } /// /// /// public object? Object => - GithubRepositoryOut as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryOut as object /// public bool Validate() { - return IsGithubRepositoryOut; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryOut = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryOut && githubRepositoryOut != null) + if (IsGithub && github != null) { - return githubRepositoryOut(GithubRepositoryOut!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryOut = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryOut) + if (IsGithub) { - githubRepositoryOut?.Invoke(GithubRepositoryOut!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryOut, + Github, typeof(global::G.GithubRepositoryOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryOut, other.GithubRepositoryOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem2.g.verified.cs index 3ce2a04831..4e10983c4f 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem2.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryIn? GithubRepositoryIn { get; init; } + public global::G.GithubRepositoryIn? Github { get; init; } #else - public global::G.GithubRepositoryIn? GithubRepositoryIn { get; } + public global::G.GithubRepositoryIn? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryIn))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryIn => GithubRepositoryIn != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryIn?(RepositoriesItem2 @this) => @this.GithubRepositoryIn; + public static implicit operator global::G.GithubRepositoryIn?(RepositoriesItem2 @this) => @this.Github; /// /// /// public RepositoriesItem2(global::G.GithubRepositoryIn? value) { - GithubRepositoryIn = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem2(global::G.GithubRepositoryIn? value) /// public RepositoriesItem2( global::G.JobInRepositorieDiscriminatorType? type, - global::G.GithubRepositoryIn? githubRepositoryIn + global::G.GithubRepositoryIn? github ) { Type = type; - GithubRepositoryIn = githubRepositoryIn; + Github = github; } /// /// /// public object? Object => - GithubRepositoryIn as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryIn as object /// public bool Validate() { - return IsGithubRepositoryIn; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryIn = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryIn && githubRepositoryIn != null) + if (IsGithub && github != null) { - return githubRepositoryIn(GithubRepositoryIn!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryIn = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryIn) + if (IsGithub) { - githubRepositoryIn?.Invoke(GithubRepositoryIn!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryIn, + Github, typeof(global::G.GithubRepositoryIn), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem2 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryIn, other.GithubRepositoryIn) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem3.g.verified.cs index a6dd4c6ca1..f44b7fca7c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RepositoriesItem3.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; init; } + public global::G.GithubRepositoryOut? Github { get; init; } #else - public global::G.GithubRepositoryOut? GithubRepositoryOut { get; } + public global::G.GithubRepositoryOut? Github { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GithubRepositoryOut))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Github))] #endif - public bool IsGithubRepositoryOut => GithubRepositoryOut != null; + public bool IsGithub => Github != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem3 @this) => @this.GithubRepositoryOut; + public static implicit operator global::G.GithubRepositoryOut?(RepositoriesItem3 @this) => @this.Github; /// /// /// public RepositoriesItem3(global::G.GithubRepositoryOut? value) { - GithubRepositoryOut = value; + Github = value; } /// @@ -56,19 +56,19 @@ public RepositoriesItem3(global::G.GithubRepositoryOut? value) /// public RepositoriesItem3( global::G.JobOutRepositorieDiscriminatorType? type, - global::G.GithubRepositoryOut? githubRepositoryOut + global::G.GithubRepositoryOut? github ) { Type = type; - GithubRepositoryOut = githubRepositoryOut; + Github = github; } /// /// /// public object? Object => - GithubRepositoryOut as object + Github as object ; /// @@ -76,14 +76,14 @@ GithubRepositoryOut as object /// public bool Validate() { - return IsGithubRepositoryOut; + return IsGithub; } /// /// /// public TResult? Match( - global::System.Func? githubRepositoryOut = null, + global::System.Func? github = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsGithubRepositoryOut && githubRepositoryOut != null) + if (IsGithub && github != null) { - return githubRepositoryOut(GithubRepositoryOut!); + return github(Github!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? githubRepositoryOut = null, + global::System.Action? github = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsGithubRepositoryOut) + if (IsGithub) { - githubRepositoryOut?.Invoke(GithubRepositoryOut!); + github?.Invoke(Github!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - GithubRepositoryOut, + Github, typeof(global::G.GithubRepositoryOut), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RepositoriesItem3 other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(GithubRepositoryOut, other.GithubRepositoryOut) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Github, other.Github) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs index 700cf16b54..b3b5ee5396 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#G.Models.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// /// #if NET6_0_OR_GREATER - public global::G.BaseModelCard? BaseCard { get; init; } + public global::G.BaseModelCard? Base { get; init; } #else - public global::G.BaseModelCard? BaseCard { get; } + public global::G.BaseModelCard? Base { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(BaseCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] #endif - public bool IsBaseCard => BaseCard != null; + public bool IsBase => Base != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.BaseModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.BaseCard; + public static implicit operator global::G.BaseModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.Base; /// /// /// public RetrieveModelV1ModelsModelIdGetResponse(global::G.BaseModelCard? value) { - BaseCard = value; + Base = value; } /// /// Extra fields for fine-tuned models. /// #if NET6_0_OR_GREATER - public global::G.FTModelCard? FTCard { get; init; } + public global::G.FTModelCard? FineTuned { get; init; } #else - public global::G.FTModelCard? FTCard { get; } + public global::G.FTModelCard? FineTuned { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FTCard))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FineTuned))] #endif - public bool IsFTCard => FTCard != null; + public bool IsFineTuned => FineTuned != null; /// /// @@ -76,14 +76,14 @@ public RetrieveModelV1ModelsModelIdGetResponse(global::G.BaseModelCard? value) /// /// /// - public static implicit operator global::G.FTModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.FTCard; + public static implicit operator global::G.FTModelCard?(RetrieveModelV1ModelsModelIdGetResponse @this) => @this.FineTuned; /// /// /// public RetrieveModelV1ModelsModelIdGetResponse(global::G.FTModelCard? value) { - FTCard = value; + FineTuned = value; } /// @@ -91,22 +91,22 @@ public RetrieveModelV1ModelsModelIdGetResponse(global::G.FTModelCard? value) /// public RetrieveModelV1ModelsModelIdGetResponse( global::G.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType? type, - global::G.BaseModelCard? baseCard, - global::G.FTModelCard? fTCard + global::G.BaseModelCard? @base, + global::G.FTModelCard? fineTuned ) { Type = type; - BaseCard = baseCard; - FTCard = fTCard; + Base = @base; + FineTuned = fineTuned; } /// /// /// public object? Object => - FTCard as object ?? - BaseCard as object + FineTuned as object ?? + Base as object ; /// @@ -114,15 +114,15 @@ BaseCard as object /// public bool Validate() { - return IsBaseCard && !IsFTCard || !IsBaseCard && IsFTCard; + return IsBase && !IsFineTuned || !IsBase && IsFineTuned; } /// /// /// public TResult? Match( - global::System.Func? baseCard = null, - global::System.Func? fTCard = null, + global::System.Func? @base = null, + global::System.Func? fineTuned = null, bool validate = true) { if (validate) @@ -130,13 +130,13 @@ public bool Validate() Validate(); } - if (IsBaseCard && baseCard != null) + if (IsBase && @base != null) { - return baseCard(BaseCard!); + return @base(Base!); } - else if (IsFTCard && fTCard != null) + else if (IsFineTuned && fineTuned != null) { - return fTCard(FTCard!); + return fineTuned(FineTuned!); } return default(TResult); @@ -146,8 +146,8 @@ public bool Validate() /// /// public void Match( - global::System.Action? baseCard = null, - global::System.Action? fTCard = null, + global::System.Action? @base = null, + global::System.Action? fineTuned = null, bool validate = true) { if (validate) @@ -155,13 +155,13 @@ public void Match( Validate(); } - if (IsBaseCard) + if (IsBase) { - baseCard?.Invoke(BaseCard!); + @base?.Invoke(Base!); } - else if (IsFTCard) + else if (IsFineTuned) { - fTCard?.Invoke(FTCard!); + fineTuned?.Invoke(FineTuned!); } } @@ -172,9 +172,9 @@ public override int GetHashCode() { var fields = new object?[] { - BaseCard, + Base, typeof(global::G.BaseModelCard), - FTCard, + FineTuned, typeof(global::G.FTModelCard), }; const int offset = unchecked((int)2166136261); @@ -191,8 +191,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(RetrieveModelV1ModelsModelIdGetResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(BaseCard, other.BaseCard) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(FTCard, other.FTCard) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FineTuned, other.FineTuned) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.ContentChunk.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.ContentChunk.g.verified.cs index 2333ef8dd7..08421aa9df 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.ContentChunk.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.ContentChunk.g.verified.cs @@ -29,18 +29,18 @@ public class ContentChunkJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.TextChunk)}"); text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ImageURLChunk? imageURL = default; + global::G.ImageURLChunk? imageUrl = default; if (discriminator?.Type == global::G.ContentChunkDiscriminatorType.ImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ImageURLChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ImageURLChunk)}"); - imageURL = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + imageUrl = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ContentChunk( discriminator?.Type, text, - imageURL + imageUrl ); return result; @@ -61,11 +61,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.TextChunk).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo); } - else if (value.IsImageURL) + else if (value.IsImageUrl) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ImageURLChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ImageURLChunk).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageURL, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageUrl, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.DataItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.DataItem.g.verified.cs index 9ec1db7e12..72c494549d 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.DataItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.DataItem.g.verified.cs @@ -22,25 +22,25 @@ public class DataItemJsonConverter : global::System.Text.Json.Serialization.Json throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ModelListDataItemDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.BaseModelCard? baseModelCard = default; + global::G.BaseModelCard? @base = default; if (discriminator?.Type == global::G.ModelListDataItemDiscriminatorType.Base) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.BaseModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.BaseModelCard)}"); - baseModelCard = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.FTModelCard? fTModelCard = default; + global::G.FTModelCard? fineTuned = default; if (discriminator?.Type == global::G.ModelListDataItemDiscriminatorType.FineTuned) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.FTModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.FTModelCard)}"); - fTModelCard = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fineTuned = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.DataItem( discriminator?.Type, - baseModelCard, - fTModelCard + @base, + fineTuned ); return result; @@ -55,17 +55,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.IsBaseModelCard) + if (value.IsBase) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.BaseModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.BaseModelCard).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseModelCard, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base, typeInfo); } - else if (value.IsFTModelCard) + else if (value.IsFineTuned) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.FTModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.FTModelCard).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FTModelCard, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FineTuned, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem.g.verified.cs index 4594e92b62..249da87541 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem.g.verified.cs @@ -22,17 +22,17 @@ public class IntegrationsItemJsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.DetailedJobOutIntegrationDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.WandbIntegrationOut? wandbIntegrationOut = default; + global::G.WandbIntegrationOut? wandb = default; if (discriminator?.Type == global::G.DetailedJobOutIntegrationDiscriminatorType.Wandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegrationOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.WandbIntegrationOut)}"); - wandbIntegrationOut = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + wandb = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.IntegrationsItem( discriminator?.Type, - wandbIntegrationOut + wandb ); return result; @@ -47,11 +47,11 @@ 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.IsWandbIntegrationOut) + if (value.IsWandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegrationOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.WandbIntegrationOut).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WandbIntegrationOut, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Wandb, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem2.g.verified.cs index c1bc21ee0a..1636c23954 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem2.g.verified.cs @@ -22,17 +22,17 @@ public class IntegrationsItem2JsonConverter : global::System.Text.Json.Serializa throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.JobInIntegrationDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.WandbIntegration? wandbIntegration = default; + global::G.WandbIntegration? wandb = default; if (discriminator?.Type == global::G.JobInIntegrationDiscriminatorType.Wandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.WandbIntegration)}"); - wandbIntegration = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + wandb = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.IntegrationsItem2( discriminator?.Type, - wandbIntegration + wandb ); return result; @@ -47,11 +47,11 @@ 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.IsWandbIntegration) + if (value.IsWandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.WandbIntegration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WandbIntegration, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Wandb, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem3.g.verified.cs index 2166fe290e..a03e0ab8ac 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.IntegrationsItem3.g.verified.cs @@ -22,17 +22,17 @@ public class IntegrationsItem3JsonConverter : global::System.Text.Json.Serializa throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.JobOutIntegrationDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.WandbIntegrationOut? wandbIntegrationOut = default; + global::G.WandbIntegrationOut? wandb = default; if (discriminator?.Type == global::G.JobOutIntegrationDiscriminatorType.Wandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegrationOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.WandbIntegrationOut)}"); - wandbIntegrationOut = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + wandb = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.IntegrationsItem3( discriminator?.Type, - wandbIntegrationOut + wandb ); return result; @@ -47,11 +47,11 @@ 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.IsWandbIntegrationOut) + if (value.IsWandb) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.WandbIntegrationOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.WandbIntegrationOut).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WandbIntegrationOut, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Wandb, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs index 579f597340..8e3b976273 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem.g.verified.cs @@ -22,33 +22,33 @@ public class MessagesItemJsonConverter : global::System.Text.Json.Serialization. throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AgentsCompletionRequestMessageDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.UserMessage? userMessage = default; + global::G.UserMessage? user = default; if (discriminator?.Role == global::G.AgentsCompletionRequestMessageDiscriminatorRole.User) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.UserMessage)}"); - userMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + user = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantMessage? assistantMessage = default; + global::G.AssistantMessage? assistant = default; if (discriminator?.Role == global::G.AgentsCompletionRequestMessageDiscriminatorRole.Assistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantMessage)}"); - assistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ToolMessage? toolMessage = default; + global::G.ToolMessage? tool = default; if (discriminator?.Role == global::G.AgentsCompletionRequestMessageDiscriminatorRole.Tool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ToolMessage)}"); - toolMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.MessagesItem( discriminator?.Role, - userMessage, - assistantMessage, - toolMessage + user, + assistant, + tool ); return result; @@ -63,23 +63,23 @@ 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.IsUserMessage) + if (value.IsUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.UserMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeInfo); } - else if (value.IsAssistantMessage) + else if (value.IsAssistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeInfo); } - else if (value.IsToolMessage) + else if (value.IsTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ToolMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem2.g.verified.cs index ad73b841d3..4225fd9805 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.MessagesItem2.g.verified.cs @@ -22,41 +22,41 @@ public class MessagesItem2JsonConverter : global::System.Text.Json.Serialization throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ChatCompletionRequestMessageDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.SystemMessage? systemMessage = default; + global::G.SystemMessage? system = default; if (discriminator?.Role == global::G.ChatCompletionRequestMessageDiscriminatorRole.System) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.SystemMessage)}"); - systemMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + system = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.UserMessage? userMessage = default; + global::G.UserMessage? user = default; if (discriminator?.Role == global::G.ChatCompletionRequestMessageDiscriminatorRole.User) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.UserMessage)}"); - userMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + user = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.AssistantMessage? assistantMessage = default; + global::G.AssistantMessage? assistant = default; if (discriminator?.Role == global::G.ChatCompletionRequestMessageDiscriminatorRole.Assistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.AssistantMessage)}"); - assistantMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + assistant = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ToolMessage? toolMessage = default; + global::G.ToolMessage? tool = default; if (discriminator?.Role == global::G.ChatCompletionRequestMessageDiscriminatorRole.Tool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ToolMessage)}"); - toolMessage = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + tool = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.MessagesItem2( discriminator?.Role, - systemMessage, - userMessage, - assistantMessage, - toolMessage + system, + user, + assistant, + tool ); return result; @@ -71,29 +71,29 @@ 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.IsSystemMessage) + if (value.IsSystem) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.SystemMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.SystemMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SystemMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.System, typeInfo); } - else if (value.IsUserMessage) + else if (value.IsUser) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.UserMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.User, typeInfo); } - else if (value.IsAssistantMessage) + else if (value.IsAssistant) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.AssistantMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.AssistantMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.AssistantMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Assistant, typeInfo); } - else if (value.IsToolMessage) + else if (value.IsTool) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ToolMessage), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ToolMessage).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ToolMessage, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Tool, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem.g.verified.cs index d1b8a5b736..fc345a6a54 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem.g.verified.cs @@ -22,17 +22,17 @@ public class RepositoriesItemJsonConverter : global::System.Text.Json.Serializat throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.DetailedJobOutRepositorieDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.GithubRepositoryOut? githubRepositoryOut = default; + global::G.GithubRepositoryOut? github = default; if (discriminator?.Type == global::G.DetailedJobOutRepositorieDiscriminatorType.Github) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.GithubRepositoryOut)}"); - githubRepositoryOut = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + github = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.RepositoriesItem( discriminator?.Type, - githubRepositoryOut + github ); return result; @@ -47,11 +47,11 @@ 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.IsGithubRepositoryOut) + if (value.IsGithub) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.GithubRepositoryOut).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GithubRepositoryOut, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Github, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem2.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem2.g.verified.cs index a685c8f92c..fce7f99445 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem2.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem2.g.verified.cs @@ -22,17 +22,17 @@ public class RepositoriesItem2JsonConverter : global::System.Text.Json.Serializa throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.JobInRepositorieDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.GithubRepositoryIn? githubRepositoryIn = default; + global::G.GithubRepositoryIn? github = default; if (discriminator?.Type == global::G.JobInRepositorieDiscriminatorType.Github) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryIn), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.GithubRepositoryIn)}"); - githubRepositoryIn = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + github = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.RepositoriesItem2( discriminator?.Type, - githubRepositoryIn + github ); return result; @@ -47,11 +47,11 @@ 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.IsGithubRepositoryIn) + if (value.IsGithub) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryIn), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.GithubRepositoryIn).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GithubRepositoryIn, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Github, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem3.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem3.g.verified.cs index 12d9747309..b972d4719b 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem3.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RepositoriesItem3.g.verified.cs @@ -22,17 +22,17 @@ public class RepositoriesItem3JsonConverter : global::System.Text.Json.Serializa throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.JobOutRepositorieDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.GithubRepositoryOut? githubRepositoryOut = default; + global::G.GithubRepositoryOut? github = default; if (discriminator?.Type == global::G.JobOutRepositorieDiscriminatorType.Github) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.GithubRepositoryOut)}"); - githubRepositoryOut = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + github = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.RepositoriesItem3( discriminator?.Type, - githubRepositoryOut + github ); return result; @@ -47,11 +47,11 @@ 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.IsGithubRepositoryOut) + if (value.IsGithub) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.GithubRepositoryOut), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.GithubRepositoryOut).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GithubRepositoryOut, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Github, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs index 5b0efe450b..2186d37104 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/mistral/SystemTextJson/_#JsonConverters.RetrieveModelV1ModelsModelIdGetResponse.g.verified.cs @@ -22,25 +22,25 @@ public class RetrieveModelV1ModelsModelIdGetResponseJsonConverter : global::Syst throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.RetrieveModelV1ModelsModelIdGetResponseDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.BaseModelCard? baseCard = default; + global::G.BaseModelCard? @base = default; if (discriminator?.Type == global::G.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType.Base) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.BaseModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.BaseModelCard)}"); - baseCard = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + @base = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.FTModelCard? fTCard = default; + global::G.FTModelCard? fineTuned = default; if (discriminator?.Type == global::G.RetrieveModelV1ModelsModelIdGetResponseDiscriminatorType.FineTuned) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.FTModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.FTModelCard)}"); - fTCard = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + fineTuned = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.RetrieveModelV1ModelsModelIdGetResponse( discriminator?.Type, - baseCard, - fTCard + @base, + fineTuned ); return result; @@ -55,17 +55,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.IsBaseCard) + if (value.IsBase) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.BaseModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.BaseModelCard).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.BaseCard, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base, typeInfo); } - else if (value.IsFTCard) + else if (value.IsFineTuned) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.FTModelCard), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.FTModelCard).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.FTCard, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FineTuned, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.ChatStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.ChatStreamedResponse.g.verified.cs index 8b08ac3646..3d4620e052 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.ChatStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.ChatStreamedResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The search response results. /// #if NET6_0_OR_GREATER - public global::G.StreamSearchResponse? StreamSearch { get; init; } + public global::G.StreamSearchResponse? SearchResults { get; init; } #else - public global::G.StreamSearchResponse? StreamSearch { get; } + public global::G.StreamSearchResponse? SearchResults { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResults))] #endif - public bool IsStreamSearch => StreamSearch != null; + public bool IsSearchResults => SearchResults != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StreamSearchResponse?(ChatStreamedResponse @this) => @this.StreamSearch; + public static implicit operator global::G.StreamSearchResponse?(ChatStreamedResponse @this) => @this.SearchResults; /// /// /// public ChatStreamedResponse(global::G.StreamSearchResponse? value) { - StreamSearch = value; + SearchResults = value; } /// /// Information about the chat. /// #if NET6_0_OR_GREATER - public global::G.ChatInfoResponse? Info { get; init; } + public global::G.ChatInfoResponse? ChatInfo { get; init; } #else - public global::G.ChatInfoResponse? Info { get; } + public global::G.ChatInfoResponse? ChatInfo { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Info))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatInfo))] #endif - public bool IsInfo => Info != null; + public bool IsChatInfo => ChatInfo != null; /// /// @@ -76,32 +76,32 @@ public ChatStreamedResponse(global::G.StreamSearchResponse? value) /// /// /// - public static implicit operator global::G.ChatInfoResponse?(ChatStreamedResponse @this) => @this.Info; + public static implicit operator global::G.ChatInfoResponse?(ChatStreamedResponse @this) => @this.ChatInfo; /// /// /// public ChatStreamedResponse(global::G.ChatInfoResponse? value) { - Info = value; + ChatInfo = value; } /// /// The chunk response from the generation, which may be a partial generation. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; init; } + public global::G.StreamGenerationChunk? GenerationChunk { get; init; } #else - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; } + public global::G.StreamGenerationChunk? GenerationChunk { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationChunk))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationChunk))] #endif - public bool IsStreamGenerationChunk => StreamGenerationChunk != null; + public bool IsGenerationChunk => GenerationChunk != null; /// /// @@ -111,14 +111,14 @@ public ChatStreamedResponse(global::G.ChatInfoResponse? value) /// /// /// - public static implicit operator global::G.StreamGenerationChunk?(ChatStreamedResponse @this) => @this.StreamGenerationChunk; + public static implicit operator global::G.StreamGenerationChunk?(ChatStreamedResponse @this) => @this.GenerationChunk; /// /// /// public ChatStreamedResponse(global::G.StreamGenerationChunk? value) { - StreamGenerationChunk = value; + GenerationChunk = value; } /// @@ -126,18 +126,18 @@ public ChatStreamedResponse(global::G.StreamGenerationChunk? value) /// factual consistency score, but generation has stopped. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; init; } + public global::G.StreamGenerationEnd? GenerationEnd { get; init; } #else - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; } + public global::G.StreamGenerationEnd? GenerationEnd { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationEnd))] #endif - public bool IsStreamGenerationEnd => StreamGenerationEnd != null; + public bool IsGenerationEnd => GenerationEnd != null; /// /// @@ -147,14 +147,14 @@ public ChatStreamedResponse(global::G.StreamGenerationChunk? value) /// /// /// - public static implicit operator global::G.StreamGenerationEnd?(ChatStreamedResponse @this) => @this.StreamGenerationEnd; + public static implicit operator global::G.StreamGenerationEnd?(ChatStreamedResponse @this) => @this.GenerationEnd; /// /// /// public ChatStreamedResponse(global::G.StreamGenerationEnd? value) { - StreamGenerationEnd = value; + GenerationEnd = value; } /// @@ -196,18 +196,18 @@ public ChatStreamedResponse(global::G.FactualConsistencyScore? value) /// The end of a query response stream. /// #if NET6_0_OR_GREATER - public global::G.StreamResponseEnd? StreamEnd { get; init; } + public global::G.StreamResponseEnd? End { get; init; } #else - public global::G.StreamResponseEnd? StreamEnd { get; } + public global::G.StreamResponseEnd? End { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))] #endif - public bool IsStreamEnd => StreamEnd != null; + public bool IsEnd => End != null; /// /// @@ -217,14 +217,14 @@ public ChatStreamedResponse(global::G.FactualConsistencyScore? value) /// /// /// - public static implicit operator global::G.StreamResponseEnd?(ChatStreamedResponse @this) => @this.StreamEnd; + public static implicit operator global::G.StreamResponseEnd?(ChatStreamedResponse @this) => @this.End; /// /// /// public ChatStreamedResponse(global::G.StreamResponseEnd? value) { - StreamEnd = value; + End = value; } /// @@ -266,18 +266,18 @@ public ChatStreamedResponse(global::G.GenerationInfo? value) /// Event signaling there was an error with the request. /// #if NET6_0_OR_GREATER - public global::G.StreamError? StreamError { get; init; } + public global::G.StreamError? Error { get; init; } #else - public global::G.StreamError? StreamError { get; } + public global::G.StreamError? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsStreamError => StreamError != null; + public bool IsError => Error != null; /// /// @@ -287,14 +287,14 @@ public ChatStreamedResponse(global::G.GenerationInfo? value) /// /// /// - public static implicit operator global::G.StreamError?(ChatStreamedResponse @this) => @this.StreamError; + public static implicit operator global::G.StreamError?(ChatStreamedResponse @this) => @this.Error; /// /// /// public ChatStreamedResponse(global::G.StreamError? value) { - StreamError = value; + Error = value; } /// @@ -302,40 +302,40 @@ public ChatStreamedResponse(global::G.StreamError? value) /// public ChatStreamedResponse( global::G.ChatStreamedResponseDiscriminatorType? type, - global::G.StreamSearchResponse? streamSearch, - global::G.ChatInfoResponse? info, - global::G.StreamGenerationChunk? streamGenerationChunk, - global::G.StreamGenerationEnd? streamGenerationEnd, + global::G.StreamSearchResponse? searchResults, + global::G.ChatInfoResponse? chatInfo, + global::G.StreamGenerationChunk? generationChunk, + global::G.StreamGenerationEnd? generationEnd, global::G.FactualConsistencyScore? factualConsistencyScore, - global::G.StreamResponseEnd? streamEnd, + global::G.StreamResponseEnd? end, global::G.GenerationInfo? generationInfo, - global::G.StreamError? streamError + global::G.StreamError? error ) { Type = type; - StreamSearch = streamSearch; - Info = info; - StreamGenerationChunk = streamGenerationChunk; - StreamGenerationEnd = streamGenerationEnd; + SearchResults = searchResults; + ChatInfo = chatInfo; + GenerationChunk = generationChunk; + GenerationEnd = generationEnd; FactualConsistencyScore = factualConsistencyScore; - StreamEnd = streamEnd; + End = end; GenerationInfo = generationInfo; - StreamError = streamError; + Error = error; } /// /// /// public object? Object => - StreamError as object ?? + Error as object ?? GenerationInfo as object ?? - StreamEnd as object ?? + End as object ?? FactualConsistencyScore as object ?? - StreamGenerationEnd as object ?? - StreamGenerationChunk as object ?? - Info as object ?? - StreamSearch as object + GenerationEnd as object ?? + GenerationChunk as object ?? + ChatInfo as object ?? + SearchResults as object ; /// @@ -343,21 +343,21 @@ StreamSearch as object /// public bool Validate() { - return IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && IsStreamError; + return IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && IsError; } /// /// /// public TResult? Match( - global::System.Func? streamSearch = null, - global::System.Func? info = null, - global::System.Func? streamGenerationChunk = null, - global::System.Func? streamGenerationEnd = null, + global::System.Func? searchResults = null, + global::System.Func? chatInfo = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, global::System.Func? factualConsistencyScore = null, - global::System.Func? streamEnd = null, + global::System.Func? end = null, global::System.Func? generationInfo = null, - global::System.Func? streamError = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -365,37 +365,37 @@ public bool Validate() Validate(); } - if (IsStreamSearch && streamSearch != null) + if (IsSearchResults && searchResults != null) { - return streamSearch(StreamSearch!); + return searchResults(SearchResults!); } - else if (IsInfo && info != null) + else if (IsChatInfo && chatInfo != null) { - return info(Info!); + return chatInfo(ChatInfo!); } - else if (IsStreamGenerationChunk && streamGenerationChunk != null) + else if (IsGenerationChunk && generationChunk != null) { - return streamGenerationChunk(StreamGenerationChunk!); + return generationChunk(GenerationChunk!); } - else if (IsStreamGenerationEnd && streamGenerationEnd != null) + else if (IsGenerationEnd && generationEnd != null) { - return streamGenerationEnd(StreamGenerationEnd!); + return generationEnd(GenerationEnd!); } else if (IsFactualConsistencyScore && factualConsistencyScore != null) { return factualConsistencyScore(FactualConsistencyScore!); } - else if (IsStreamEnd && streamEnd != null) + else if (IsEnd && end != null) { - return streamEnd(StreamEnd!); + return end(End!); } else if (IsGenerationInfo && generationInfo != null) { return generationInfo(GenerationInfo!); } - else if (IsStreamError && streamError != null) + else if (IsError && error != null) { - return streamError(StreamError!); + return error(Error!); } return default(TResult); @@ -405,14 +405,14 @@ public bool Validate() /// /// public void Match( - global::System.Action? streamSearch = null, - global::System.Action? info = null, - global::System.Action? streamGenerationChunk = null, - global::System.Action? streamGenerationEnd = null, + global::System.Action? searchResults = null, + global::System.Action? chatInfo = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, global::System.Action? factualConsistencyScore = null, - global::System.Action? streamEnd = null, + global::System.Action? end = null, global::System.Action? generationInfo = null, - global::System.Action? streamError = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -420,37 +420,37 @@ public void Match( Validate(); } - if (IsStreamSearch) + if (IsSearchResults) { - streamSearch?.Invoke(StreamSearch!); + searchResults?.Invoke(SearchResults!); } - else if (IsInfo) + else if (IsChatInfo) { - info?.Invoke(Info!); + chatInfo?.Invoke(ChatInfo!); } - else if (IsStreamGenerationChunk) + else if (IsGenerationChunk) { - streamGenerationChunk?.Invoke(StreamGenerationChunk!); + generationChunk?.Invoke(GenerationChunk!); } - else if (IsStreamGenerationEnd) + else if (IsGenerationEnd) { - streamGenerationEnd?.Invoke(StreamGenerationEnd!); + generationEnd?.Invoke(GenerationEnd!); } else if (IsFactualConsistencyScore) { factualConsistencyScore?.Invoke(FactualConsistencyScore!); } - else if (IsStreamEnd) + else if (IsEnd) { - streamEnd?.Invoke(StreamEnd!); + end?.Invoke(End!); } else if (IsGenerationInfo) { generationInfo?.Invoke(GenerationInfo!); } - else if (IsStreamError) + else if (IsError) { - streamError?.Invoke(StreamError!); + error?.Invoke(Error!); } } @@ -461,21 +461,21 @@ public override int GetHashCode() { var fields = new object?[] { - StreamSearch, + SearchResults, typeof(global::G.StreamSearchResponse), - Info, + ChatInfo, typeof(global::G.ChatInfoResponse), - StreamGenerationChunk, + GenerationChunk, typeof(global::G.StreamGenerationChunk), - StreamGenerationEnd, + GenerationEnd, typeof(global::G.StreamGenerationEnd), FactualConsistencyScore, typeof(global::G.FactualConsistencyScore), - StreamEnd, + End, typeof(global::G.StreamResponseEnd), GenerationInfo, typeof(global::G.GenerationInfo), - StreamError, + Error, typeof(global::G.StreamError), }; const int offset = unchecked((int)2166136261); @@ -492,14 +492,14 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatStreamedResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamSearch, other.StreamSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Info, other.Info) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationChunk, other.StreamGenerationChunk) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationEnd, other.StreamGenerationEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResults, other.SearchResults) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatInfo, other.ChatInfo) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationChunk, other.GenerationChunk) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationEnd, other.GenerationEnd) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FactualConsistencyScore, other.FactualConsistencyScore) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(End, other.End) && global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationInfo, other.GenerationInfo) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.CreateAppClientRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.CreateAppClientRequest.g.verified.cs index 23a660a0ad..c2ba08cb98 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.CreateAppClientRequest.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.CreateAppClientRequest.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Create an App Client which allows you to call Vectara APIs using OAuth 2.0 client credentials. /// #if NET6_0_OR_GREATER - public global::G.CreateClientCredentialsRequest? Credentials { get; init; } + public global::G.CreateClientCredentialsRequest? ClientCredentials { get; init; } #else - public global::G.CreateClientCredentialsRequest? Credentials { get; } + public global::G.CreateClientCredentialsRequest? ClientCredentials { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Credentials))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientCredentials))] #endif - public bool IsCredentials => Credentials != null; + public bool IsClientCredentials => ClientCredentials != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.CreateClientCredentialsRequest?(CreateAppClientRequest @this) => @this.Credentials; + public static implicit operator global::G.CreateClientCredentialsRequest?(CreateAppClientRequest @this) => @this.ClientCredentials; /// /// /// public CreateAppClientRequest(global::G.CreateClientCredentialsRequest? value) { - Credentials = value; + ClientCredentials = value; } /// @@ -56,19 +56,19 @@ public CreateAppClientRequest(global::G.CreateClientCredentialsRequest? value) /// public CreateAppClientRequest( global::G.CreateAppClientRequestDiscriminatorType? type, - global::G.CreateClientCredentialsRequest? credentials + global::G.CreateClientCredentialsRequest? clientCredentials ) { Type = type; - Credentials = credentials; + ClientCredentials = clientCredentials; } /// /// /// public object? Object => - Credentials as object + ClientCredentials as object ; /// @@ -76,14 +76,14 @@ Credentials as object /// public bool Validate() { - return IsCredentials; + return IsClientCredentials; } /// /// /// public TResult? Match( - global::System.Func? credentials = null, + global::System.Func? clientCredentials = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsCredentials && credentials != null) + if (IsClientCredentials && clientCredentials != null) { - return credentials(Credentials!); + return clientCredentials(ClientCredentials!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? credentials = null, + global::System.Action? clientCredentials = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsCredentials) + if (IsClientCredentials) { - credentials?.Invoke(Credentials!); + clientCredentials?.Invoke(ClientCredentials!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - Credentials, + ClientCredentials, typeof(global::G.CreateClientCredentialsRequest), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateAppClientRequest other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Credentials, other.Credentials) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientCredentials, other.ClientCredentials) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.QueryStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.QueryStreamedResponse.g.verified.cs index 3cb4a7087a..5d185010e2 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.QueryStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.QueryStreamedResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The search response results. /// #if NET6_0_OR_GREATER - public global::G.StreamSearchResponse? StreamSearch { get; init; } + public global::G.StreamSearchResponse? SearchResults { get; init; } #else - public global::G.StreamSearchResponse? StreamSearch { get; } + public global::G.StreamSearchResponse? SearchResults { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResults))] #endif - public bool IsStreamSearch => StreamSearch != null; + public bool IsSearchResults => SearchResults != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StreamSearchResponse?(QueryStreamedResponse @this) => @this.StreamSearch; + public static implicit operator global::G.StreamSearchResponse?(QueryStreamedResponse @this) => @this.SearchResults; /// /// /// public QueryStreamedResponse(global::G.StreamSearchResponse? value) { - StreamSearch = value; + SearchResults = value; } /// /// The chunk response from the generation, which may be a partial generation. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; init; } + public global::G.StreamGenerationChunk? GenerationChunk { get; init; } #else - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; } + public global::G.StreamGenerationChunk? GenerationChunk { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationChunk))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationChunk))] #endif - public bool IsStreamGenerationChunk => StreamGenerationChunk != null; + public bool IsGenerationChunk => GenerationChunk != null; /// /// @@ -76,14 +76,14 @@ public QueryStreamedResponse(global::G.StreamSearchResponse? value) /// /// /// - public static implicit operator global::G.StreamGenerationChunk?(QueryStreamedResponse @this) => @this.StreamGenerationChunk; + public static implicit operator global::G.StreamGenerationChunk?(QueryStreamedResponse @this) => @this.GenerationChunk; /// /// /// public QueryStreamedResponse(global::G.StreamGenerationChunk? value) { - StreamGenerationChunk = value; + GenerationChunk = value; } /// @@ -91,18 +91,18 @@ public QueryStreamedResponse(global::G.StreamGenerationChunk? value) /// factual consistency score, but generation has stopped. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; init; } + public global::G.StreamGenerationEnd? GenerationEnd { get; init; } #else - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; } + public global::G.StreamGenerationEnd? GenerationEnd { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationEnd))] #endif - public bool IsStreamGenerationEnd => StreamGenerationEnd != null; + public bool IsGenerationEnd => GenerationEnd != null; /// /// @@ -112,32 +112,32 @@ public QueryStreamedResponse(global::G.StreamGenerationChunk? value) /// /// /// - public static implicit operator global::G.StreamGenerationEnd?(QueryStreamedResponse @this) => @this.StreamGenerationEnd; + public static implicit operator global::G.StreamGenerationEnd?(QueryStreamedResponse @this) => @this.GenerationEnd; /// /// /// public QueryStreamedResponse(global::G.StreamGenerationEnd? value) { - StreamGenerationEnd = value; + GenerationEnd = value; } /// /// The end of a query response stream. /// #if NET6_0_OR_GREATER - public global::G.StreamResponseEnd? StreamEnd { get; init; } + public global::G.StreamResponseEnd? End { get; init; } #else - public global::G.StreamResponseEnd? StreamEnd { get; } + public global::G.StreamResponseEnd? End { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))] #endif - public bool IsStreamEnd => StreamEnd != null; + public bool IsEnd => End != null; /// /// @@ -147,14 +147,14 @@ public QueryStreamedResponse(global::G.StreamGenerationEnd? value) /// /// /// - public static implicit operator global::G.StreamResponseEnd?(QueryStreamedResponse @this) => @this.StreamEnd; + public static implicit operator global::G.StreamResponseEnd?(QueryStreamedResponse @this) => @this.End; /// /// /// public QueryStreamedResponse(global::G.StreamResponseEnd? value) { - StreamEnd = value; + End = value; } /// @@ -231,18 +231,18 @@ public QueryStreamedResponse(global::G.GenerationInfo? value) /// Event signaling there was an error with the request. /// #if NET6_0_OR_GREATER - public global::G.StreamError? StreamError { get; init; } + public global::G.StreamError? Error { get; init; } #else - public global::G.StreamError? StreamError { get; } + public global::G.StreamError? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsStreamError => StreamError != null; + public bool IsError => Error != null; /// /// @@ -252,14 +252,14 @@ public QueryStreamedResponse(global::G.GenerationInfo? value) /// /// /// - public static implicit operator global::G.StreamError?(QueryStreamedResponse @this) => @this.StreamError; + public static implicit operator global::G.StreamError?(QueryStreamedResponse @this) => @this.Error; /// /// /// public QueryStreamedResponse(global::G.StreamError? value) { - StreamError = value; + Error = value; } /// @@ -267,37 +267,37 @@ public QueryStreamedResponse(global::G.StreamError? value) /// public QueryStreamedResponse( global::G.QueryStreamedResponseDiscriminatorType? type, - global::G.StreamSearchResponse? streamSearch, - global::G.StreamGenerationChunk? streamGenerationChunk, - global::G.StreamGenerationEnd? streamGenerationEnd, - global::G.StreamResponseEnd? streamEnd, + global::G.StreamSearchResponse? searchResults, + global::G.StreamGenerationChunk? generationChunk, + global::G.StreamGenerationEnd? generationEnd, + global::G.StreamResponseEnd? end, global::G.FactualConsistencyScore? factualConsistencyScore, global::G.GenerationInfo? generationInfo, - global::G.StreamError? streamError + global::G.StreamError? error ) { Type = type; - StreamSearch = streamSearch; - StreamGenerationChunk = streamGenerationChunk; - StreamGenerationEnd = streamGenerationEnd; - StreamEnd = streamEnd; + SearchResults = searchResults; + GenerationChunk = generationChunk; + GenerationEnd = generationEnd; + End = end; FactualConsistencyScore = factualConsistencyScore; GenerationInfo = generationInfo; - StreamError = streamError; + Error = error; } /// /// /// public object? Object => - StreamError as object ?? + Error as object ?? GenerationInfo as object ?? FactualConsistencyScore as object ?? - StreamEnd as object ?? - StreamGenerationEnd as object ?? - StreamGenerationChunk as object ?? - StreamSearch as object + End as object ?? + GenerationEnd as object ?? + GenerationChunk as object ?? + SearchResults as object ; /// @@ -305,20 +305,20 @@ StreamSearch as object /// public bool Validate() { - return IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && IsStreamError; + return IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && IsError; } /// /// /// public TResult? Match( - global::System.Func? streamSearch = null, - global::System.Func? streamGenerationChunk = null, - global::System.Func? streamGenerationEnd = null, - global::System.Func? streamEnd = null, + global::System.Func? searchResults = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, + global::System.Func? end = null, global::System.Func? factualConsistencyScore = null, global::System.Func? generationInfo = null, - global::System.Func? streamError = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -326,21 +326,21 @@ public bool Validate() Validate(); } - if (IsStreamSearch && streamSearch != null) + if (IsSearchResults && searchResults != null) { - return streamSearch(StreamSearch!); + return searchResults(SearchResults!); } - else if (IsStreamGenerationChunk && streamGenerationChunk != null) + else if (IsGenerationChunk && generationChunk != null) { - return streamGenerationChunk(StreamGenerationChunk!); + return generationChunk(GenerationChunk!); } - else if (IsStreamGenerationEnd && streamGenerationEnd != null) + else if (IsGenerationEnd && generationEnd != null) { - return streamGenerationEnd(StreamGenerationEnd!); + return generationEnd(GenerationEnd!); } - else if (IsStreamEnd && streamEnd != null) + else if (IsEnd && end != null) { - return streamEnd(StreamEnd!); + return end(End!); } else if (IsFactualConsistencyScore && factualConsistencyScore != null) { @@ -350,9 +350,9 @@ public bool Validate() { return generationInfo(GenerationInfo!); } - else if (IsStreamError && streamError != null) + else if (IsError && error != null) { - return streamError(StreamError!); + return error(Error!); } return default(TResult); @@ -362,13 +362,13 @@ public bool Validate() /// /// public void Match( - global::System.Action? streamSearch = null, - global::System.Action? streamGenerationChunk = null, - global::System.Action? streamGenerationEnd = null, - global::System.Action? streamEnd = null, + global::System.Action? searchResults = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, + global::System.Action? end = null, global::System.Action? factualConsistencyScore = null, global::System.Action? generationInfo = null, - global::System.Action? streamError = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -376,21 +376,21 @@ public void Match( Validate(); } - if (IsStreamSearch) + if (IsSearchResults) { - streamSearch?.Invoke(StreamSearch!); + searchResults?.Invoke(SearchResults!); } - else if (IsStreamGenerationChunk) + else if (IsGenerationChunk) { - streamGenerationChunk?.Invoke(StreamGenerationChunk!); + generationChunk?.Invoke(GenerationChunk!); } - else if (IsStreamGenerationEnd) + else if (IsGenerationEnd) { - streamGenerationEnd?.Invoke(StreamGenerationEnd!); + generationEnd?.Invoke(GenerationEnd!); } - else if (IsStreamEnd) + else if (IsEnd) { - streamEnd?.Invoke(StreamEnd!); + end?.Invoke(End!); } else if (IsFactualConsistencyScore) { @@ -400,9 +400,9 @@ public void Match( { generationInfo?.Invoke(GenerationInfo!); } - else if (IsStreamError) + else if (IsError) { - streamError?.Invoke(StreamError!); + error?.Invoke(Error!); } } @@ -413,19 +413,19 @@ public override int GetHashCode() { var fields = new object?[] { - StreamSearch, + SearchResults, typeof(global::G.StreamSearchResponse), - StreamGenerationChunk, + GenerationChunk, typeof(global::G.StreamGenerationChunk), - StreamGenerationEnd, + GenerationEnd, typeof(global::G.StreamGenerationEnd), - StreamEnd, + End, typeof(global::G.StreamResponseEnd), FactualConsistencyScore, typeof(global::G.FactualConsistencyScore), GenerationInfo, typeof(global::G.GenerationInfo), - StreamError, + Error, typeof(global::G.StreamError), }; const int offset = unchecked((int)2166136261); @@ -442,13 +442,13 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(QueryStreamedResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamSearch, other.StreamSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationChunk, other.StreamGenerationChunk) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationEnd, other.StreamGenerationEnd) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResults, other.SearchResults) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationChunk, other.GenerationChunk) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationEnd, other.GenerationEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(End, other.End) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FactualConsistencyScore, other.FactualConsistencyScore) && global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationInfo, other.GenerationInfo) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.SearchReranker.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.SearchReranker.g.verified.cs index d5f82efbe0..9fd7ade4ee 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.SearchReranker.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/NewtonsoftJson/_#G.Models.SearchReranker.g.verified.cs @@ -22,18 +22,18 @@ namespace G /// Reranker that is specific to the customer. /// #if NET6_0_OR_GREATER - public global::G.CustomerSpecificReranker? CustomerSpecific { get; init; } + public global::G.CustomerSpecificReranker? CustomerReranker { get; init; } #else - public global::G.CustomerSpecificReranker? CustomerSpecific { get; } + public global::G.CustomerSpecificReranker? CustomerReranker { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomerSpecific))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomerReranker))] #endif - public bool IsCustomerSpecific => CustomerSpecific != null; + public bool IsCustomerReranker => CustomerReranker != null; /// /// @@ -43,32 +43,32 @@ namespace G /// /// /// - public static implicit operator global::G.CustomerSpecificReranker?(SearchReranker @this) => @this.CustomerSpecific; + public static implicit operator global::G.CustomerSpecificReranker?(SearchReranker @this) => @this.CustomerReranker; /// /// /// public SearchReranker(global::G.CustomerSpecificReranker? value) { - CustomerSpecific = value; + CustomerReranker = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.UserFunctionReranker? UserFunction { get; init; } + public global::G.UserFunctionReranker? Userfn { get; init; } #else - public global::G.UserFunctionReranker? UserFunction { get; } + public global::G.UserFunctionReranker? Userfn { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Userfn))] #endif - public bool IsUserFunction => UserFunction != null; + public bool IsUserfn => Userfn != null; /// /// @@ -78,32 +78,32 @@ public SearchReranker(global::G.CustomerSpecificReranker? value) /// /// /// - public static implicit operator global::G.UserFunctionReranker?(SearchReranker @this) => @this.UserFunction; + public static implicit operator global::G.UserFunctionReranker?(SearchReranker @this) => @this.Userfn; /// /// /// public SearchReranker(global::G.UserFunctionReranker? value) { - UserFunction = value; + Userfn = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.MMRReranker? MR { get; init; } + public global::G.MMRReranker? Mmr { get; init; } #else - public global::G.MMRReranker? MR { get; } + public global::G.MMRReranker? Mmr { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MR))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Mmr))] #endif - public bool IsMR => MR != null; + public bool IsMmr => Mmr != null; /// /// @@ -113,14 +113,14 @@ public SearchReranker(global::G.UserFunctionReranker? value) /// /// /// - public static implicit operator global::G.MMRReranker?(SearchReranker @this) => @this.MR; + public static implicit operator global::G.MMRReranker?(SearchReranker @this) => @this.Mmr; /// /// /// public SearchReranker(global::G.MMRReranker? value) { - MR = value; + Mmr = value; } /// @@ -198,18 +198,18 @@ public SearchReranker(global::G.NoneReranker? value) /// public SearchReranker( global::G.SearchRerankerDiscriminatorType? type, - global::G.CustomerSpecificReranker? customerSpecific, - global::G.UserFunctionReranker? userFunction, - global::G.MMRReranker? mR, + global::G.CustomerSpecificReranker? customerReranker, + global::G.UserFunctionReranker? userfn, + global::G.MMRReranker? mmr, global::G.ChainReranker? chain, global::G.NoneReranker? none ) { Type = type; - CustomerSpecific = customerSpecific; - UserFunction = userFunction; - MR = mR; + CustomerReranker = customerReranker; + Userfn = userfn; + Mmr = mmr; Chain = chain; None = none; } @@ -220,9 +220,9 @@ public SearchReranker( public object? Object => None as object ?? Chain as object ?? - MR as object ?? - UserFunction as object ?? - CustomerSpecific as object + Mmr as object ?? + Userfn as object ?? + CustomerReranker as object ; /// @@ -230,16 +230,16 @@ CustomerSpecific as object /// public bool Validate() { - return IsCustomerSpecific && !IsUserFunction && !IsMR && !IsChain && !IsNone || !IsCustomerSpecific && IsUserFunction && !IsMR && !IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && IsMR && !IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && !IsMR && IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && !IsMR && !IsChain && IsNone; + return IsCustomerReranker && !IsUserfn && !IsMmr && !IsChain && !IsNone || !IsCustomerReranker && IsUserfn && !IsMmr && !IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && IsMmr && !IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && !IsMmr && IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && !IsMmr && !IsChain && IsNone; } /// /// /// public TResult? Match( - global::System.Func? customerSpecific = null, - global::System.Func? userFunction = null, - global::System.Func? mR = null, + global::System.Func? customerReranker = null, + global::System.Func? userfn = null, + global::System.Func? mmr = null, global::System.Func? chain = null, global::System.Func? none = null, bool validate = true) @@ -249,17 +249,17 @@ public bool Validate() Validate(); } - if (IsCustomerSpecific && customerSpecific != null) + if (IsCustomerReranker && customerReranker != null) { - return customerSpecific(CustomerSpecific!); + return customerReranker(CustomerReranker!); } - else if (IsUserFunction && userFunction != null) + else if (IsUserfn && userfn != null) { - return userFunction(UserFunction!); + return userfn(Userfn!); } - else if (IsMR && mR != null) + else if (IsMmr && mmr != null) { - return mR(MR!); + return mmr(Mmr!); } else if (IsChain && chain != null) { @@ -277,9 +277,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? customerSpecific = null, - global::System.Action? userFunction = null, - global::System.Action? mR = null, + global::System.Action? customerReranker = null, + global::System.Action? userfn = null, + global::System.Action? mmr = null, global::System.Action? chain = null, global::System.Action? none = null, bool validate = true) @@ -289,17 +289,17 @@ public void Match( Validate(); } - if (IsCustomerSpecific) + if (IsCustomerReranker) { - customerSpecific?.Invoke(CustomerSpecific!); + customerReranker?.Invoke(CustomerReranker!); } - else if (IsUserFunction) + else if (IsUserfn) { - userFunction?.Invoke(UserFunction!); + userfn?.Invoke(Userfn!); } - else if (IsMR) + else if (IsMmr) { - mR?.Invoke(MR!); + mmr?.Invoke(Mmr!); } else if (IsChain) { @@ -318,11 +318,11 @@ public override int GetHashCode() { var fields = new object?[] { - CustomerSpecific, + CustomerReranker, typeof(global::G.CustomerSpecificReranker), - UserFunction, + Userfn, typeof(global::G.UserFunctionReranker), - MR, + Mmr, typeof(global::G.MMRReranker), Chain, typeof(global::G.ChainReranker), @@ -343,9 +343,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(SearchReranker other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomerSpecific, other.CustomerSpecific) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserFunction, other.UserFunction) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MR, other.MR) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomerReranker, other.CustomerReranker) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Userfn, other.Userfn) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Mmr, other.Mmr) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Chain, other.Chain) && global::System.Collections.Generic.EqualityComparer.Default.Equals(None, other.None) ; diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.ChatStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.ChatStreamedResponse.g.verified.cs index 9e515475b6..d54eace534 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.ChatStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.ChatStreamedResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The search response results. /// #if NET6_0_OR_GREATER - public global::G.StreamSearchResponse? StreamSearch { get; init; } + public global::G.StreamSearchResponse? SearchResults { get; init; } #else - public global::G.StreamSearchResponse? StreamSearch { get; } + public global::G.StreamSearchResponse? SearchResults { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResults))] #endif - public bool IsStreamSearch => StreamSearch != null; + public bool IsSearchResults => SearchResults != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StreamSearchResponse?(ChatStreamedResponse @this) => @this.StreamSearch; + public static implicit operator global::G.StreamSearchResponse?(ChatStreamedResponse @this) => @this.SearchResults; /// /// /// public ChatStreamedResponse(global::G.StreamSearchResponse? value) { - StreamSearch = value; + SearchResults = value; } /// /// Information about the chat. /// #if NET6_0_OR_GREATER - public global::G.ChatInfoResponse? Info { get; init; } + public global::G.ChatInfoResponse? ChatInfo { get; init; } #else - public global::G.ChatInfoResponse? Info { get; } + public global::G.ChatInfoResponse? ChatInfo { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Info))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatInfo))] #endif - public bool IsInfo => Info != null; + public bool IsChatInfo => ChatInfo != null; /// /// @@ -76,32 +76,32 @@ public ChatStreamedResponse(global::G.StreamSearchResponse? value) /// /// /// - public static implicit operator global::G.ChatInfoResponse?(ChatStreamedResponse @this) => @this.Info; + public static implicit operator global::G.ChatInfoResponse?(ChatStreamedResponse @this) => @this.ChatInfo; /// /// /// public ChatStreamedResponse(global::G.ChatInfoResponse? value) { - Info = value; + ChatInfo = value; } /// /// The chunk response from the generation, which may be a partial generation. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; init; } + public global::G.StreamGenerationChunk? GenerationChunk { get; init; } #else - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; } + public global::G.StreamGenerationChunk? GenerationChunk { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationChunk))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationChunk))] #endif - public bool IsStreamGenerationChunk => StreamGenerationChunk != null; + public bool IsGenerationChunk => GenerationChunk != null; /// /// @@ -111,14 +111,14 @@ public ChatStreamedResponse(global::G.ChatInfoResponse? value) /// /// /// - public static implicit operator global::G.StreamGenerationChunk?(ChatStreamedResponse @this) => @this.StreamGenerationChunk; + public static implicit operator global::G.StreamGenerationChunk?(ChatStreamedResponse @this) => @this.GenerationChunk; /// /// /// public ChatStreamedResponse(global::G.StreamGenerationChunk? value) { - StreamGenerationChunk = value; + GenerationChunk = value; } /// @@ -126,18 +126,18 @@ public ChatStreamedResponse(global::G.StreamGenerationChunk? value) /// factual consistency score, but generation has stopped. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; init; } + public global::G.StreamGenerationEnd? GenerationEnd { get; init; } #else - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; } + public global::G.StreamGenerationEnd? GenerationEnd { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationEnd))] #endif - public bool IsStreamGenerationEnd => StreamGenerationEnd != null; + public bool IsGenerationEnd => GenerationEnd != null; /// /// @@ -147,14 +147,14 @@ public ChatStreamedResponse(global::G.StreamGenerationChunk? value) /// /// /// - public static implicit operator global::G.StreamGenerationEnd?(ChatStreamedResponse @this) => @this.StreamGenerationEnd; + public static implicit operator global::G.StreamGenerationEnd?(ChatStreamedResponse @this) => @this.GenerationEnd; /// /// /// public ChatStreamedResponse(global::G.StreamGenerationEnd? value) { - StreamGenerationEnd = value; + GenerationEnd = value; } /// @@ -196,18 +196,18 @@ public ChatStreamedResponse(global::G.FactualConsistencyScore? value) /// The end of a query response stream. /// #if NET6_0_OR_GREATER - public global::G.StreamResponseEnd? StreamEnd { get; init; } + public global::G.StreamResponseEnd? End { get; init; } #else - public global::G.StreamResponseEnd? StreamEnd { get; } + public global::G.StreamResponseEnd? End { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))] #endif - public bool IsStreamEnd => StreamEnd != null; + public bool IsEnd => End != null; /// /// @@ -217,14 +217,14 @@ public ChatStreamedResponse(global::G.FactualConsistencyScore? value) /// /// /// - public static implicit operator global::G.StreamResponseEnd?(ChatStreamedResponse @this) => @this.StreamEnd; + public static implicit operator global::G.StreamResponseEnd?(ChatStreamedResponse @this) => @this.End; /// /// /// public ChatStreamedResponse(global::G.StreamResponseEnd? value) { - StreamEnd = value; + End = value; } /// @@ -266,18 +266,18 @@ public ChatStreamedResponse(global::G.GenerationInfo? value) /// Event signaling there was an error with the request. /// #if NET6_0_OR_GREATER - public global::G.StreamError? StreamError { get; init; } + public global::G.StreamError? Error { get; init; } #else - public global::G.StreamError? StreamError { get; } + public global::G.StreamError? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsStreamError => StreamError != null; + public bool IsError => Error != null; /// /// @@ -287,14 +287,14 @@ public ChatStreamedResponse(global::G.GenerationInfo? value) /// /// /// - public static implicit operator global::G.StreamError?(ChatStreamedResponse @this) => @this.StreamError; + public static implicit operator global::G.StreamError?(ChatStreamedResponse @this) => @this.Error; /// /// /// public ChatStreamedResponse(global::G.StreamError? value) { - StreamError = value; + Error = value; } /// @@ -302,40 +302,40 @@ public ChatStreamedResponse(global::G.StreamError? value) /// public ChatStreamedResponse( global::G.ChatStreamedResponseDiscriminatorType? type, - global::G.StreamSearchResponse? streamSearch, - global::G.ChatInfoResponse? info, - global::G.StreamGenerationChunk? streamGenerationChunk, - global::G.StreamGenerationEnd? streamGenerationEnd, + global::G.StreamSearchResponse? searchResults, + global::G.ChatInfoResponse? chatInfo, + global::G.StreamGenerationChunk? generationChunk, + global::G.StreamGenerationEnd? generationEnd, global::G.FactualConsistencyScore? factualConsistencyScore, - global::G.StreamResponseEnd? streamEnd, + global::G.StreamResponseEnd? end, global::G.GenerationInfo? generationInfo, - global::G.StreamError? streamError + global::G.StreamError? error ) { Type = type; - StreamSearch = streamSearch; - Info = info; - StreamGenerationChunk = streamGenerationChunk; - StreamGenerationEnd = streamGenerationEnd; + SearchResults = searchResults; + ChatInfo = chatInfo; + GenerationChunk = generationChunk; + GenerationEnd = generationEnd; FactualConsistencyScore = factualConsistencyScore; - StreamEnd = streamEnd; + End = end; GenerationInfo = generationInfo; - StreamError = streamError; + Error = error; } /// /// /// public object? Object => - StreamError as object ?? + Error as object ?? GenerationInfo as object ?? - StreamEnd as object ?? + End as object ?? FactualConsistencyScore as object ?? - StreamGenerationEnd as object ?? - StreamGenerationChunk as object ?? - Info as object ?? - StreamSearch as object + GenerationEnd as object ?? + GenerationChunk as object ?? + ChatInfo as object ?? + SearchResults as object ; /// @@ -343,21 +343,21 @@ StreamSearch as object /// public bool Validate() { - return IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && IsStreamEnd && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsInfo && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsFactualConsistencyScore && !IsStreamEnd && !IsGenerationInfo && IsStreamError; + return IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && IsEnd && !IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && IsGenerationInfo && !IsError || !IsSearchResults && !IsChatInfo && !IsGenerationChunk && !IsGenerationEnd && !IsFactualConsistencyScore && !IsEnd && !IsGenerationInfo && IsError; } /// /// /// public TResult? Match( - global::System.Func? streamSearch = null, - global::System.Func? info = null, - global::System.Func? streamGenerationChunk = null, - global::System.Func? streamGenerationEnd = null, + global::System.Func? searchResults = null, + global::System.Func? chatInfo = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, global::System.Func? factualConsistencyScore = null, - global::System.Func? streamEnd = null, + global::System.Func? end = null, global::System.Func? generationInfo = null, - global::System.Func? streamError = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -365,37 +365,37 @@ public bool Validate() Validate(); } - if (IsStreamSearch && streamSearch != null) + if (IsSearchResults && searchResults != null) { - return streamSearch(StreamSearch!); + return searchResults(SearchResults!); } - else if (IsInfo && info != null) + else if (IsChatInfo && chatInfo != null) { - return info(Info!); + return chatInfo(ChatInfo!); } - else if (IsStreamGenerationChunk && streamGenerationChunk != null) + else if (IsGenerationChunk && generationChunk != null) { - return streamGenerationChunk(StreamGenerationChunk!); + return generationChunk(GenerationChunk!); } - else if (IsStreamGenerationEnd && streamGenerationEnd != null) + else if (IsGenerationEnd && generationEnd != null) { - return streamGenerationEnd(StreamGenerationEnd!); + return generationEnd(GenerationEnd!); } else if (IsFactualConsistencyScore && factualConsistencyScore != null) { return factualConsistencyScore(FactualConsistencyScore!); } - else if (IsStreamEnd && streamEnd != null) + else if (IsEnd && end != null) { - return streamEnd(StreamEnd!); + return end(End!); } else if (IsGenerationInfo && generationInfo != null) { return generationInfo(GenerationInfo!); } - else if (IsStreamError && streamError != null) + else if (IsError && error != null) { - return streamError(StreamError!); + return error(Error!); } return default(TResult); @@ -405,14 +405,14 @@ public bool Validate() /// /// public void Match( - global::System.Action? streamSearch = null, - global::System.Action? info = null, - global::System.Action? streamGenerationChunk = null, - global::System.Action? streamGenerationEnd = null, + global::System.Action? searchResults = null, + global::System.Action? chatInfo = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, global::System.Action? factualConsistencyScore = null, - global::System.Action? streamEnd = null, + global::System.Action? end = null, global::System.Action? generationInfo = null, - global::System.Action? streamError = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -420,37 +420,37 @@ public void Match( Validate(); } - if (IsStreamSearch) + if (IsSearchResults) { - streamSearch?.Invoke(StreamSearch!); + searchResults?.Invoke(SearchResults!); } - else if (IsInfo) + else if (IsChatInfo) { - info?.Invoke(Info!); + chatInfo?.Invoke(ChatInfo!); } - else if (IsStreamGenerationChunk) + else if (IsGenerationChunk) { - streamGenerationChunk?.Invoke(StreamGenerationChunk!); + generationChunk?.Invoke(GenerationChunk!); } - else if (IsStreamGenerationEnd) + else if (IsGenerationEnd) { - streamGenerationEnd?.Invoke(StreamGenerationEnd!); + generationEnd?.Invoke(GenerationEnd!); } else if (IsFactualConsistencyScore) { factualConsistencyScore?.Invoke(FactualConsistencyScore!); } - else if (IsStreamEnd) + else if (IsEnd) { - streamEnd?.Invoke(StreamEnd!); + end?.Invoke(End!); } else if (IsGenerationInfo) { generationInfo?.Invoke(GenerationInfo!); } - else if (IsStreamError) + else if (IsError) { - streamError?.Invoke(StreamError!); + error?.Invoke(Error!); } } @@ -461,21 +461,21 @@ public override int GetHashCode() { var fields = new object?[] { - StreamSearch, + SearchResults, typeof(global::G.StreamSearchResponse), - Info, + ChatInfo, typeof(global::G.ChatInfoResponse), - StreamGenerationChunk, + GenerationChunk, typeof(global::G.StreamGenerationChunk), - StreamGenerationEnd, + GenerationEnd, typeof(global::G.StreamGenerationEnd), FactualConsistencyScore, typeof(global::G.FactualConsistencyScore), - StreamEnd, + End, typeof(global::G.StreamResponseEnd), GenerationInfo, typeof(global::G.GenerationInfo), - StreamError, + Error, typeof(global::G.StreamError), }; const int offset = unchecked((int)2166136261); @@ -492,14 +492,14 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(ChatStreamedResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamSearch, other.StreamSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Info, other.Info) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationChunk, other.StreamGenerationChunk) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationEnd, other.StreamGenerationEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResults, other.SearchResults) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(ChatInfo, other.ChatInfo) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationChunk, other.GenerationChunk) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationEnd, other.GenerationEnd) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FactualConsistencyScore, other.FactualConsistencyScore) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(End, other.End) && global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationInfo, other.GenerationInfo) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.CreateAppClientRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.CreateAppClientRequest.g.verified.cs index 6d6f1a1428..46cb7c0582 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.CreateAppClientRequest.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.CreateAppClientRequest.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// Create an App Client which allows you to call Vectara APIs using OAuth 2.0 client credentials. /// #if NET6_0_OR_GREATER - public global::G.CreateClientCredentialsRequest? Credentials { get; init; } + public global::G.CreateClientCredentialsRequest? ClientCredentials { get; init; } #else - public global::G.CreateClientCredentialsRequest? Credentials { get; } + public global::G.CreateClientCredentialsRequest? ClientCredentials { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Credentials))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientCredentials))] #endif - public bool IsCredentials => Credentials != null; + public bool IsClientCredentials => ClientCredentials != null; /// /// @@ -41,14 +41,14 @@ namespace G /// /// /// - public static implicit operator global::G.CreateClientCredentialsRequest?(CreateAppClientRequest @this) => @this.Credentials; + public static implicit operator global::G.CreateClientCredentialsRequest?(CreateAppClientRequest @this) => @this.ClientCredentials; /// /// /// public CreateAppClientRequest(global::G.CreateClientCredentialsRequest? value) { - Credentials = value; + ClientCredentials = value; } /// @@ -56,19 +56,19 @@ public CreateAppClientRequest(global::G.CreateClientCredentialsRequest? value) /// public CreateAppClientRequest( global::G.CreateAppClientRequestDiscriminatorType? type, - global::G.CreateClientCredentialsRequest? credentials + global::G.CreateClientCredentialsRequest? clientCredentials ) { Type = type; - Credentials = credentials; + ClientCredentials = clientCredentials; } /// /// /// public object? Object => - Credentials as object + ClientCredentials as object ; /// @@ -76,14 +76,14 @@ Credentials as object /// public bool Validate() { - return IsCredentials; + return IsClientCredentials; } /// /// /// public TResult? Match( - global::System.Func? credentials = null, + global::System.Func? clientCredentials = null, bool validate = true) { if (validate) @@ -91,9 +91,9 @@ public bool Validate() Validate(); } - if (IsCredentials && credentials != null) + if (IsClientCredentials && clientCredentials != null) { - return credentials(Credentials!); + return clientCredentials(ClientCredentials!); } return default(TResult); @@ -103,7 +103,7 @@ public bool Validate() /// /// public void Match( - global::System.Action? credentials = null, + global::System.Action? clientCredentials = null, bool validate = true) { if (validate) @@ -111,9 +111,9 @@ public void Match( Validate(); } - if (IsCredentials) + if (IsClientCredentials) { - credentials?.Invoke(Credentials!); + clientCredentials?.Invoke(ClientCredentials!); } } @@ -124,7 +124,7 @@ public override int GetHashCode() { var fields = new object?[] { - Credentials, + ClientCredentials, typeof(global::G.CreateClientCredentialsRequest), }; const int offset = unchecked((int)2166136261); @@ -141,7 +141,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(CreateAppClientRequest other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Credentials, other.Credentials) + global::System.Collections.Generic.EqualityComparer.Default.Equals(ClientCredentials, other.ClientCredentials) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.QueryStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.QueryStreamedResponse.g.verified.cs index 88e1642dd2..d6ec17e9d6 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.QueryStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.QueryStreamedResponse.g.verified.cs @@ -20,18 +20,18 @@ namespace G /// The search response results. /// #if NET6_0_OR_GREATER - public global::G.StreamSearchResponse? StreamSearch { get; init; } + public global::G.StreamSearchResponse? SearchResults { get; init; } #else - public global::G.StreamSearchResponse? StreamSearch { get; } + public global::G.StreamSearchResponse? SearchResults { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamSearch))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SearchResults))] #endif - public bool IsStreamSearch => StreamSearch != null; + public bool IsSearchResults => SearchResults != null; /// /// @@ -41,32 +41,32 @@ namespace G /// /// /// - public static implicit operator global::G.StreamSearchResponse?(QueryStreamedResponse @this) => @this.StreamSearch; + public static implicit operator global::G.StreamSearchResponse?(QueryStreamedResponse @this) => @this.SearchResults; /// /// /// public QueryStreamedResponse(global::G.StreamSearchResponse? value) { - StreamSearch = value; + SearchResults = value; } /// /// The chunk response from the generation, which may be a partial generation. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; init; } + public global::G.StreamGenerationChunk? GenerationChunk { get; init; } #else - public global::G.StreamGenerationChunk? StreamGenerationChunk { get; } + public global::G.StreamGenerationChunk? GenerationChunk { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationChunk))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationChunk))] #endif - public bool IsStreamGenerationChunk => StreamGenerationChunk != null; + public bool IsGenerationChunk => GenerationChunk != null; /// /// @@ -76,14 +76,14 @@ public QueryStreamedResponse(global::G.StreamSearchResponse? value) /// /// /// - public static implicit operator global::G.StreamGenerationChunk?(QueryStreamedResponse @this) => @this.StreamGenerationChunk; + public static implicit operator global::G.StreamGenerationChunk?(QueryStreamedResponse @this) => @this.GenerationChunk; /// /// /// public QueryStreamedResponse(global::G.StreamGenerationChunk? value) { - StreamGenerationChunk = value; + GenerationChunk = value; } /// @@ -91,18 +91,18 @@ public QueryStreamedResponse(global::G.StreamGenerationChunk? value) /// factual consistency score, but generation has stopped. /// #if NET6_0_OR_GREATER - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; init; } + public global::G.StreamGenerationEnd? GenerationEnd { get; init; } #else - public global::G.StreamGenerationEnd? StreamGenerationEnd { get; } + public global::G.StreamGenerationEnd? GenerationEnd { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamGenerationEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GenerationEnd))] #endif - public bool IsStreamGenerationEnd => StreamGenerationEnd != null; + public bool IsGenerationEnd => GenerationEnd != null; /// /// @@ -112,32 +112,32 @@ public QueryStreamedResponse(global::G.StreamGenerationChunk? value) /// /// /// - public static implicit operator global::G.StreamGenerationEnd?(QueryStreamedResponse @this) => @this.StreamGenerationEnd; + public static implicit operator global::G.StreamGenerationEnd?(QueryStreamedResponse @this) => @this.GenerationEnd; /// /// /// public QueryStreamedResponse(global::G.StreamGenerationEnd? value) { - StreamGenerationEnd = value; + GenerationEnd = value; } /// /// The end of a query response stream. /// #if NET6_0_OR_GREATER - public global::G.StreamResponseEnd? StreamEnd { get; init; } + public global::G.StreamResponseEnd? End { get; init; } #else - public global::G.StreamResponseEnd? StreamEnd { get; } + public global::G.StreamResponseEnd? End { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamEnd))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))] #endif - public bool IsStreamEnd => StreamEnd != null; + public bool IsEnd => End != null; /// /// @@ -147,14 +147,14 @@ public QueryStreamedResponse(global::G.StreamGenerationEnd? value) /// /// /// - public static implicit operator global::G.StreamResponseEnd?(QueryStreamedResponse @this) => @this.StreamEnd; + public static implicit operator global::G.StreamResponseEnd?(QueryStreamedResponse @this) => @this.End; /// /// /// public QueryStreamedResponse(global::G.StreamResponseEnd? value) { - StreamEnd = value; + End = value; } /// @@ -231,18 +231,18 @@ public QueryStreamedResponse(global::G.GenerationInfo? value) /// Event signaling there was an error with the request. /// #if NET6_0_OR_GREATER - public global::G.StreamError? StreamError { get; init; } + public global::G.StreamError? Error { get; init; } #else - public global::G.StreamError? StreamError { get; } + public global::G.StreamError? Error { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(StreamError))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))] #endif - public bool IsStreamError => StreamError != null; + public bool IsError => Error != null; /// /// @@ -252,14 +252,14 @@ public QueryStreamedResponse(global::G.GenerationInfo? value) /// /// /// - public static implicit operator global::G.StreamError?(QueryStreamedResponse @this) => @this.StreamError; + public static implicit operator global::G.StreamError?(QueryStreamedResponse @this) => @this.Error; /// /// /// public QueryStreamedResponse(global::G.StreamError? value) { - StreamError = value; + Error = value; } /// @@ -267,37 +267,37 @@ public QueryStreamedResponse(global::G.StreamError? value) /// public QueryStreamedResponse( global::G.QueryStreamedResponseDiscriminatorType? type, - global::G.StreamSearchResponse? streamSearch, - global::G.StreamGenerationChunk? streamGenerationChunk, - global::G.StreamGenerationEnd? streamGenerationEnd, - global::G.StreamResponseEnd? streamEnd, + global::G.StreamSearchResponse? searchResults, + global::G.StreamGenerationChunk? generationChunk, + global::G.StreamGenerationEnd? generationEnd, + global::G.StreamResponseEnd? end, global::G.FactualConsistencyScore? factualConsistencyScore, global::G.GenerationInfo? generationInfo, - global::G.StreamError? streamError + global::G.StreamError? error ) { Type = type; - StreamSearch = streamSearch; - StreamGenerationChunk = streamGenerationChunk; - StreamGenerationEnd = streamGenerationEnd; - StreamEnd = streamEnd; + SearchResults = searchResults; + GenerationChunk = generationChunk; + GenerationEnd = generationEnd; + End = end; FactualConsistencyScore = factualConsistencyScore; GenerationInfo = generationInfo; - StreamError = streamError; + Error = error; } /// /// /// public object? Object => - StreamError as object ?? + Error as object ?? GenerationInfo as object ?? FactualConsistencyScore as object ?? - StreamEnd as object ?? - StreamGenerationEnd as object ?? - StreamGenerationChunk as object ?? - StreamSearch as object + End as object ?? + GenerationEnd as object ?? + GenerationChunk as object ?? + SearchResults as object ; /// @@ -305,20 +305,20 @@ StreamSearch as object /// public bool Validate() { - return IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && IsFactualConsistencyScore && !IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && IsGenerationInfo && !IsStreamError || !IsStreamSearch && !IsStreamGenerationChunk && !IsStreamGenerationEnd && !IsStreamEnd && !IsFactualConsistencyScore && !IsGenerationInfo && IsStreamError; + return IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && IsFactualConsistencyScore && !IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && IsGenerationInfo && !IsError || !IsSearchResults && !IsGenerationChunk && !IsGenerationEnd && !IsEnd && !IsFactualConsistencyScore && !IsGenerationInfo && IsError; } /// /// /// public TResult? Match( - global::System.Func? streamSearch = null, - global::System.Func? streamGenerationChunk = null, - global::System.Func? streamGenerationEnd = null, - global::System.Func? streamEnd = null, + global::System.Func? searchResults = null, + global::System.Func? generationChunk = null, + global::System.Func? generationEnd = null, + global::System.Func? end = null, global::System.Func? factualConsistencyScore = null, global::System.Func? generationInfo = null, - global::System.Func? streamError = null, + global::System.Func? error = null, bool validate = true) { if (validate) @@ -326,21 +326,21 @@ public bool Validate() Validate(); } - if (IsStreamSearch && streamSearch != null) + if (IsSearchResults && searchResults != null) { - return streamSearch(StreamSearch!); + return searchResults(SearchResults!); } - else if (IsStreamGenerationChunk && streamGenerationChunk != null) + else if (IsGenerationChunk && generationChunk != null) { - return streamGenerationChunk(StreamGenerationChunk!); + return generationChunk(GenerationChunk!); } - else if (IsStreamGenerationEnd && streamGenerationEnd != null) + else if (IsGenerationEnd && generationEnd != null) { - return streamGenerationEnd(StreamGenerationEnd!); + return generationEnd(GenerationEnd!); } - else if (IsStreamEnd && streamEnd != null) + else if (IsEnd && end != null) { - return streamEnd(StreamEnd!); + return end(End!); } else if (IsFactualConsistencyScore && factualConsistencyScore != null) { @@ -350,9 +350,9 @@ public bool Validate() { return generationInfo(GenerationInfo!); } - else if (IsStreamError && streamError != null) + else if (IsError && error != null) { - return streamError(StreamError!); + return error(Error!); } return default(TResult); @@ -362,13 +362,13 @@ public bool Validate() /// /// public void Match( - global::System.Action? streamSearch = null, - global::System.Action? streamGenerationChunk = null, - global::System.Action? streamGenerationEnd = null, - global::System.Action? streamEnd = null, + global::System.Action? searchResults = null, + global::System.Action? generationChunk = null, + global::System.Action? generationEnd = null, + global::System.Action? end = null, global::System.Action? factualConsistencyScore = null, global::System.Action? generationInfo = null, - global::System.Action? streamError = null, + global::System.Action? error = null, bool validate = true) { if (validate) @@ -376,21 +376,21 @@ public void Match( Validate(); } - if (IsStreamSearch) + if (IsSearchResults) { - streamSearch?.Invoke(StreamSearch!); + searchResults?.Invoke(SearchResults!); } - else if (IsStreamGenerationChunk) + else if (IsGenerationChunk) { - streamGenerationChunk?.Invoke(StreamGenerationChunk!); + generationChunk?.Invoke(GenerationChunk!); } - else if (IsStreamGenerationEnd) + else if (IsGenerationEnd) { - streamGenerationEnd?.Invoke(StreamGenerationEnd!); + generationEnd?.Invoke(GenerationEnd!); } - else if (IsStreamEnd) + else if (IsEnd) { - streamEnd?.Invoke(StreamEnd!); + end?.Invoke(End!); } else if (IsFactualConsistencyScore) { @@ -400,9 +400,9 @@ public void Match( { generationInfo?.Invoke(GenerationInfo!); } - else if (IsStreamError) + else if (IsError) { - streamError?.Invoke(StreamError!); + error?.Invoke(Error!); } } @@ -413,19 +413,19 @@ public override int GetHashCode() { var fields = new object?[] { - StreamSearch, + SearchResults, typeof(global::G.StreamSearchResponse), - StreamGenerationChunk, + GenerationChunk, typeof(global::G.StreamGenerationChunk), - StreamGenerationEnd, + GenerationEnd, typeof(global::G.StreamGenerationEnd), - StreamEnd, + End, typeof(global::G.StreamResponseEnd), FactualConsistencyScore, typeof(global::G.FactualConsistencyScore), GenerationInfo, typeof(global::G.GenerationInfo), - StreamError, + Error, typeof(global::G.StreamError), }; const int offset = unchecked((int)2166136261); @@ -442,13 +442,13 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(QueryStreamedResponse other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamSearch, other.StreamSearch) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationChunk, other.StreamGenerationChunk) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamGenerationEnd, other.StreamGenerationEnd) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamEnd, other.StreamEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(SearchResults, other.SearchResults) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationChunk, other.GenerationChunk) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationEnd, other.GenerationEnd) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(End, other.End) && global::System.Collections.Generic.EqualityComparer.Default.Equals(FactualConsistencyScore, other.FactualConsistencyScore) && global::System.Collections.Generic.EqualityComparer.Default.Equals(GenerationInfo, other.GenerationInfo) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(StreamError, other.StreamError) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Error, other.Error) ; } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.SearchReranker.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.SearchReranker.g.verified.cs index 1356dde090..e7e82e3207 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.SearchReranker.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#G.Models.SearchReranker.g.verified.cs @@ -22,18 +22,18 @@ namespace G /// Reranker that is specific to the customer. /// #if NET6_0_OR_GREATER - public global::G.CustomerSpecificReranker? CustomerSpecific { get; init; } + public global::G.CustomerSpecificReranker? CustomerReranker { get; init; } #else - public global::G.CustomerSpecificReranker? CustomerSpecific { get; } + public global::G.CustomerSpecificReranker? CustomerReranker { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomerSpecific))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CustomerReranker))] #endif - public bool IsCustomerSpecific => CustomerSpecific != null; + public bool IsCustomerReranker => CustomerReranker != null; /// /// @@ -43,32 +43,32 @@ namespace G /// /// /// - public static implicit operator global::G.CustomerSpecificReranker?(SearchReranker @this) => @this.CustomerSpecific; + public static implicit operator global::G.CustomerSpecificReranker?(SearchReranker @this) => @this.CustomerReranker; /// /// /// public SearchReranker(global::G.CustomerSpecificReranker? value) { - CustomerSpecific = value; + CustomerReranker = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.UserFunctionReranker? UserFunction { get; init; } + public global::G.UserFunctionReranker? Userfn { get; init; } #else - public global::G.UserFunctionReranker? UserFunction { get; } + public global::G.UserFunctionReranker? Userfn { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(UserFunction))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Userfn))] #endif - public bool IsUserFunction => UserFunction != null; + public bool IsUserfn => Userfn != null; /// /// @@ -78,32 +78,32 @@ public SearchReranker(global::G.CustomerSpecificReranker? value) /// /// /// - public static implicit operator global::G.UserFunctionReranker?(SearchReranker @this) => @this.UserFunction; + public static implicit operator global::G.UserFunctionReranker?(SearchReranker @this) => @this.Userfn; /// /// /// public SearchReranker(global::G.UserFunctionReranker? value) { - UserFunction = value; + Userfn = value; } /// /// /// #if NET6_0_OR_GREATER - public global::G.MMRReranker? MR { get; init; } + public global::G.MMRReranker? Mmr { get; init; } #else - public global::G.MMRReranker? MR { get; } + public global::G.MMRReranker? Mmr { get; } #endif /// /// /// #if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MR))] + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Mmr))] #endif - public bool IsMR => MR != null; + public bool IsMmr => Mmr != null; /// /// @@ -113,14 +113,14 @@ public SearchReranker(global::G.UserFunctionReranker? value) /// /// /// - public static implicit operator global::G.MMRReranker?(SearchReranker @this) => @this.MR; + public static implicit operator global::G.MMRReranker?(SearchReranker @this) => @this.Mmr; /// /// /// public SearchReranker(global::G.MMRReranker? value) { - MR = value; + Mmr = value; } /// @@ -198,18 +198,18 @@ public SearchReranker(global::G.NoneReranker? value) /// public SearchReranker( global::G.SearchRerankerDiscriminatorType? type, - global::G.CustomerSpecificReranker? customerSpecific, - global::G.UserFunctionReranker? userFunction, - global::G.MMRReranker? mR, + global::G.CustomerSpecificReranker? customerReranker, + global::G.UserFunctionReranker? userfn, + global::G.MMRReranker? mmr, global::G.ChainReranker? chain, global::G.NoneReranker? none ) { Type = type; - CustomerSpecific = customerSpecific; - UserFunction = userFunction; - MR = mR; + CustomerReranker = customerReranker; + Userfn = userfn; + Mmr = mmr; Chain = chain; None = none; } @@ -220,9 +220,9 @@ public SearchReranker( public object? Object => None as object ?? Chain as object ?? - MR as object ?? - UserFunction as object ?? - CustomerSpecific as object + Mmr as object ?? + Userfn as object ?? + CustomerReranker as object ; /// @@ -230,16 +230,16 @@ CustomerSpecific as object /// public bool Validate() { - return IsCustomerSpecific && !IsUserFunction && !IsMR && !IsChain && !IsNone || !IsCustomerSpecific && IsUserFunction && !IsMR && !IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && IsMR && !IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && !IsMR && IsChain && !IsNone || !IsCustomerSpecific && !IsUserFunction && !IsMR && !IsChain && IsNone; + return IsCustomerReranker && !IsUserfn && !IsMmr && !IsChain && !IsNone || !IsCustomerReranker && IsUserfn && !IsMmr && !IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && IsMmr && !IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && !IsMmr && IsChain && !IsNone || !IsCustomerReranker && !IsUserfn && !IsMmr && !IsChain && IsNone; } /// /// /// public TResult? Match( - global::System.Func? customerSpecific = null, - global::System.Func? userFunction = null, - global::System.Func? mR = null, + global::System.Func? customerReranker = null, + global::System.Func? userfn = null, + global::System.Func? mmr = null, global::System.Func? chain = null, global::System.Func? none = null, bool validate = true) @@ -249,17 +249,17 @@ public bool Validate() Validate(); } - if (IsCustomerSpecific && customerSpecific != null) + if (IsCustomerReranker && customerReranker != null) { - return customerSpecific(CustomerSpecific!); + return customerReranker(CustomerReranker!); } - else if (IsUserFunction && userFunction != null) + else if (IsUserfn && userfn != null) { - return userFunction(UserFunction!); + return userfn(Userfn!); } - else if (IsMR && mR != null) + else if (IsMmr && mmr != null) { - return mR(MR!); + return mmr(Mmr!); } else if (IsChain && chain != null) { @@ -277,9 +277,9 @@ public bool Validate() /// /// public void Match( - global::System.Action? customerSpecific = null, - global::System.Action? userFunction = null, - global::System.Action? mR = null, + global::System.Action? customerReranker = null, + global::System.Action? userfn = null, + global::System.Action? mmr = null, global::System.Action? chain = null, global::System.Action? none = null, bool validate = true) @@ -289,17 +289,17 @@ public void Match( Validate(); } - if (IsCustomerSpecific) + if (IsCustomerReranker) { - customerSpecific?.Invoke(CustomerSpecific!); + customerReranker?.Invoke(CustomerReranker!); } - else if (IsUserFunction) + else if (IsUserfn) { - userFunction?.Invoke(UserFunction!); + userfn?.Invoke(Userfn!); } - else if (IsMR) + else if (IsMmr) { - mR?.Invoke(MR!); + mmr?.Invoke(Mmr!); } else if (IsChain) { @@ -318,11 +318,11 @@ public override int GetHashCode() { var fields = new object?[] { - CustomerSpecific, + CustomerReranker, typeof(global::G.CustomerSpecificReranker), - UserFunction, + Userfn, typeof(global::G.UserFunctionReranker), - MR, + Mmr, typeof(global::G.MMRReranker), Chain, typeof(global::G.ChainReranker), @@ -343,9 +343,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(SearchReranker other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomerSpecific, other.CustomerSpecific) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(UserFunction, other.UserFunction) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(MR, other.MR) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(CustomerReranker, other.CustomerReranker) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Userfn, other.Userfn) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Mmr, other.Mmr) && global::System.Collections.Generic.EqualityComparer.Default.Equals(Chain, other.Chain) && global::System.Collections.Generic.EqualityComparer.Default.Equals(None, other.None) ; diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.ChatStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.ChatStreamedResponse.g.verified.cs index 9d8311a324..555504859c 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.ChatStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.ChatStreamedResponse.g.verified.cs @@ -22,33 +22,33 @@ public class ChatStreamedResponseJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ChatStreamedResponseDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.StreamSearchResponse? streamSearch = default; + global::G.StreamSearchResponse? searchResults = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.SearchResults) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamSearchResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamSearchResponse)}"); - streamSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + searchResults = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.ChatInfoResponse? info = default; + global::G.ChatInfoResponse? chatInfo = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.ChatInfo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ChatInfoResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.ChatInfoResponse)}"); - info = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + chatInfo = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamGenerationChunk? streamGenerationChunk = default; + global::G.StreamGenerationChunk? generationChunk = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.GenerationChunk) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamGenerationChunk)}"); - streamGenerationChunk = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + generationChunk = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamGenerationEnd? streamGenerationEnd = default; + global::G.StreamGenerationEnd? generationEnd = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.GenerationEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamGenerationEnd)}"); - streamGenerationEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + generationEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::G.FactualConsistencyScore? factualConsistencyScore = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.FactualConsistencyScore) @@ -57,12 +57,12 @@ public class ChatStreamedResponseJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.FactualConsistencyScore)}"); factualConsistencyScore = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamResponseEnd? streamEnd = default; + global::G.StreamResponseEnd? end = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.End) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamResponseEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamResponseEnd)}"); - streamEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + end = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::G.GenerationInfo? generationInfo = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.GenerationInfo) @@ -71,24 +71,24 @@ public class ChatStreamedResponseJsonConverter : global::System.Text.Json.Serial throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.GenerationInfo)}"); generationInfo = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamError? streamError = default; + global::G.StreamError? error = default; if (discriminator?.Type == global::G.ChatStreamedResponseDiscriminatorType.Error) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamError)}"); - streamError = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + error = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.ChatStreamedResponse( discriminator?.Type, - streamSearch, - info, - streamGenerationChunk, - streamGenerationEnd, + searchResults, + chatInfo, + generationChunk, + generationEnd, factualConsistencyScore, - streamEnd, + end, generationInfo, - streamError + error ); return result; @@ -103,29 +103,29 @@ 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.IsStreamSearch) + if (value.IsSearchResults) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamSearchResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamSearchResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchResults, typeInfo); } - else if (value.IsInfo) + else if (value.IsChatInfo) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.ChatInfoResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.ChatInfoResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Info, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ChatInfo, typeInfo); } - else if (value.IsStreamGenerationChunk) + else if (value.IsGenerationChunk) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamGenerationChunk).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamGenerationChunk, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationChunk, typeInfo); } - else if (value.IsStreamGenerationEnd) + else if (value.IsGenerationEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamGenerationEnd).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamGenerationEnd, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationEnd, typeInfo); } else if (value.IsFactualConsistencyScore) { @@ -133,11 +133,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.FactualConsistencyScore).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.FactualConsistencyScore, typeInfo); } - else if (value.IsStreamEnd) + else if (value.IsEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamResponseEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamResponseEnd).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamEnd, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.End, typeInfo); } else if (value.IsGenerationInfo) { @@ -145,11 +145,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.GenerationInfo).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationInfo, typeInfo); } - else if (value.IsStreamError) + else if (value.IsError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamError).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamError, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.CreateAppClientRequest.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.CreateAppClientRequest.g.verified.cs index 4e935f92ec..9d76bd2045 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.CreateAppClientRequest.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.CreateAppClientRequest.g.verified.cs @@ -22,17 +22,17 @@ public class CreateAppClientRequestJsonConverter : global::System.Text.Json.Seri throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateAppClientRequestDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.CreateClientCredentialsRequest? credentials = default; + global::G.CreateClientCredentialsRequest? clientCredentials = default; if (discriminator?.Type == global::G.CreateAppClientRequestDiscriminatorType.ClientCredentials) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateClientCredentialsRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CreateClientCredentialsRequest)}"); - credentials = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + clientCredentials = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.CreateAppClientRequest( discriminator?.Type, - credentials + clientCredentials ); return result; @@ -47,11 +47,11 @@ 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.IsCredentials) + if (value.IsClientCredentials) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CreateClientCredentialsRequest), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CreateClientCredentialsRequest).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Credentials, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientCredentials, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.QueryStreamedResponse.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.QueryStreamedResponse.g.verified.cs index 15ea562dc6..e187444447 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.QueryStreamedResponse.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.QueryStreamedResponse.g.verified.cs @@ -22,33 +22,33 @@ public class QueryStreamedResponseJsonConverter : global::System.Text.Json.Seria throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.QueryStreamedResponseDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.StreamSearchResponse? streamSearch = default; + global::G.StreamSearchResponse? searchResults = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.SearchResults) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamSearchResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamSearchResponse)}"); - streamSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + searchResults = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamGenerationChunk? streamGenerationChunk = default; + global::G.StreamGenerationChunk? generationChunk = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.GenerationChunk) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamGenerationChunk)}"); - streamGenerationChunk = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + generationChunk = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamGenerationEnd? streamGenerationEnd = default; + global::G.StreamGenerationEnd? generationEnd = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.GenerationEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamGenerationEnd)}"); - streamGenerationEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + generationEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamResponseEnd? streamEnd = default; + global::G.StreamResponseEnd? end = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.End) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamResponseEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamResponseEnd)}"); - streamEnd = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + end = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::G.FactualConsistencyScore? factualConsistencyScore = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.FactualConsistencyScore) @@ -64,23 +64,23 @@ public class QueryStreamedResponseJsonConverter : global::System.Text.Json.Seria throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.GenerationInfo)}"); generationInfo = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.StreamError? streamError = default; + global::G.StreamError? error = default; if (discriminator?.Type == global::G.QueryStreamedResponseDiscriminatorType.Error) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.StreamError)}"); - streamError = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + error = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } var result = new global::G.QueryStreamedResponse( discriminator?.Type, - streamSearch, - streamGenerationChunk, - streamGenerationEnd, - streamEnd, + searchResults, + generationChunk, + generationEnd, + end, factualConsistencyScore, generationInfo, - streamError + error ); return result; @@ -95,29 +95,29 @@ 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.IsStreamSearch) + if (value.IsSearchResults) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamSearchResponse), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamSearchResponse).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamSearch, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SearchResults, typeInfo); } - else if (value.IsStreamGenerationChunk) + else if (value.IsGenerationChunk) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationChunk), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamGenerationChunk).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamGenerationChunk, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationChunk, typeInfo); } - else if (value.IsStreamGenerationEnd) + else if (value.IsGenerationEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamGenerationEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamGenerationEnd).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamGenerationEnd, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationEnd, typeInfo); } - else if (value.IsStreamEnd) + else if (value.IsEnd) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamResponseEnd), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamResponseEnd).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamEnd, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.End, typeInfo); } else if (value.IsFactualConsistencyScore) { @@ -131,11 +131,11 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.GenerationInfo).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.GenerationInfo, typeInfo); } - else if (value.IsStreamError) + else if (value.IsError) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.StreamError), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.StreamError).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.StreamError, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Error, typeInfo); } } } diff --git a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.SearchReranker.g.verified.cs b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.SearchReranker.g.verified.cs index aa43f82153..47476d3bc3 100644 --- a/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.SearchReranker.g.verified.cs +++ b/src/tests/AutoSDK.SnapshotTests/Snapshots/vectara/SystemTextJson/_#JsonConverters.SearchReranker.g.verified.cs @@ -22,26 +22,26 @@ public class SearchRerankerJsonConverter : global::System.Text.Json.Serializatio throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.SearchRerankerDiscriminator)}"); var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); - global::G.CustomerSpecificReranker? customerSpecific = default; + global::G.CustomerSpecificReranker? customerReranker = default; if (discriminator?.Type == global::G.SearchRerankerDiscriminatorType.CustomerReranker) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CustomerSpecificReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.CustomerSpecificReranker)}"); - customerSpecific = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + customerReranker = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.UserFunctionReranker? userFunction = default; + global::G.UserFunctionReranker? userfn = default; if (discriminator?.Type == global::G.SearchRerankerDiscriminatorType.Userfn) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserFunctionReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.UserFunctionReranker)}"); - userFunction = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + userfn = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - global::G.MMRReranker? mR = default; + global::G.MMRReranker? mmr = default; if (discriminator?.Type == global::G.SearchRerankerDiscriminatorType.Mmr) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MMRReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::G.MMRReranker)}"); - mR = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + mmr = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } global::G.ChainReranker? chain = default; if (discriminator?.Type == global::G.SearchRerankerDiscriminatorType.Chain) @@ -60,9 +60,9 @@ public class SearchRerankerJsonConverter : global::System.Text.Json.Serializatio var result = new global::G.SearchReranker( discriminator?.Type, - customerSpecific, - userFunction, - mR, + customerReranker, + userfn, + mmr, chain, none ); @@ -79,23 +79,23 @@ 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.IsCustomerSpecific) + if (value.IsCustomerReranker) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.CustomerSpecificReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.CustomerSpecificReranker).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomerSpecific, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CustomerReranker, typeInfo); } - else if (value.IsUserFunction) + else if (value.IsUserfn) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.UserFunctionReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.UserFunctionReranker).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.UserFunction, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Userfn, typeInfo); } - else if (value.IsMR) + else if (value.IsMmr) { var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::G.MMRReranker), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::G.MMRReranker).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.MR, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Mmr, typeInfo); } else if (value.IsChain) {