-
Notifications
You must be signed in to change notification settings - Fork 359
Bump to version 1.0.0-alpha.20260116.3 - Add internal partial structs for new enums #907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| using Microsoft.TypeSpec.Generator.Customizations; | ||
|
|
||
| namespace OpenAI.Videos; | ||
|
|
||
| // CUSTOM: | ||
| // - Renamed. | ||
| // - Made internal until we support the convenience methods. | ||
| [CodeGenType("OrderEnum")] | ||
| internal readonly partial struct InternalOrderEnum | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only other tip / suggestion I have is to use the access decorator to set this type to internal. Though I don't see us using that anywhere else, so feel free to ignore and see what Jose thinks! |
||
| { | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| using Microsoft.TypeSpec.Generator.Customizations; | ||
|
|
||
| namespace OpenAI.Videos; | ||
|
|
||
| // CUSTOM: | ||
| // - Renamed. | ||
| // - Made internal until we support the convenience methods. | ||
| [CodeGenType("VideoContentVariant")] | ||
| internal readonly partial struct InternalVideoContentVariant | ||
| { | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // <auto-generated/> | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System; | ||
| using System.ComponentModel; | ||
|
|
||
| namespace OpenAI.Videos | ||
| { | ||
| internal readonly partial struct InternalOrderEnum : IEquatable<InternalOrderEnum> | ||
| { | ||
| private readonly string _value; | ||
| private const string AscValue = "asc"; | ||
| private const string DescValue = "desc"; | ||
|
|
||
| public InternalOrderEnum(string value) | ||
| { | ||
| _value = value; | ||
| } | ||
|
|
||
| internal static InternalOrderEnum Asc { get; } = new InternalOrderEnum(AscValue); | ||
|
|
||
| internal static InternalOrderEnum Desc { get; } = new InternalOrderEnum(DescValue); | ||
|
|
||
| public static bool operator ==(InternalOrderEnum left, InternalOrderEnum right) => left.Equals(right); | ||
|
|
||
| public static bool operator !=(InternalOrderEnum left, InternalOrderEnum right) => !left.Equals(right); | ||
|
|
||
| public static implicit operator InternalOrderEnum(string value) => new InternalOrderEnum(value); | ||
|
|
||
| public static implicit operator InternalOrderEnum?(string value) => value == null ? null : new InternalOrderEnum(value); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) => obj is InternalOrderEnum other && Equals(other); | ||
|
|
||
| public bool Equals(InternalOrderEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; | ||
|
|
||
| public override string ToString() => _value; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| // <auto-generated/> | ||
|
|
||
| #nullable disable | ||
|
|
||
| using System; | ||
| using System.ComponentModel; | ||
|
|
||
| namespace OpenAI.Videos | ||
| { | ||
| internal readonly partial struct InternalVideoContentVariant : IEquatable<InternalVideoContentVariant> | ||
| { | ||
| private readonly string _value; | ||
| private const string VideoValue = "video"; | ||
| private const string ThumbnailValue = "thumbnail"; | ||
| private const string SpritesheetValue = "spritesheet"; | ||
|
|
||
| public InternalVideoContentVariant(string value) | ||
| { | ||
| _value = value; | ||
| } | ||
|
|
||
| internal static InternalVideoContentVariant Video { get; } = new InternalVideoContentVariant(VideoValue); | ||
|
|
||
| internal static InternalVideoContentVariant Thumbnail { get; } = new InternalVideoContentVariant(ThumbnailValue); | ||
|
|
||
| internal static InternalVideoContentVariant Spritesheet { get; } = new InternalVideoContentVariant(SpritesheetValue); | ||
|
|
||
| public static bool operator ==(InternalVideoContentVariant left, InternalVideoContentVariant right) => left.Equals(right); | ||
|
|
||
| public static bool operator !=(InternalVideoContentVariant left, InternalVideoContentVariant right) => !left.Equals(right); | ||
|
|
||
| public static implicit operator InternalVideoContentVariant(string value) => new InternalVideoContentVariant(value); | ||
|
|
||
| public static implicit operator InternalVideoContentVariant?(string value) => value == null ? null : new InternalVideoContentVariant(value); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) => obj is InternalVideoContentVariant other && Equals(other); | ||
|
|
||
| public bool Equals(InternalVideoContentVariant other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); | ||
|
|
||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; | ||
|
|
||
| public override string ToString() => _value; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.