Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/libs/GitHub/Generated/GitHub..JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5751,6 +5751,8 @@ namespace GitHub
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSortNullableJsonConverter),
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsOrderJsonConverter),
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsOrderNullableJsonConverter),
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSearchTypeJsonConverter),
typeof(global::GitHub.JsonConverters.SearchIssuesAndPullRequestsSearchTypeNullableJsonConverter),
typeof(global::GitHub.JsonConverters.SearchLabelsSortJsonConverter),
typeof(global::GitHub.JsonConverters.SearchLabelsSortNullableJsonConverter),
typeof(global::GitHub.JsonConverters.SearchLabelsOrderJsonConverter),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public partial interface IOrgsClient
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::GitHub.ApiException"></exception>
global::System.Threading.Tasks.Task OrgsCreateOrUpdateCustomPropertiesValuesForReposAsync(
global::System.Threading.Tasks.Task OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesAsync(
string org,
global::GitHub.OrgsCreateOrUpdateCustomPropertiesValuesForReposRequest request,
global::GitHub.OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesRequest request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
Expand All @@ -42,7 +42,7 @@ public partial interface IOrgsClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task OrgsCreateOrUpdateCustomPropertiesValuesForReposAsync(
global::System.Threading.Tasks.Task OrgsCustomPropertiesForReposCreateOrUpdateOrganizationValuesAsync(
string org,
global::System.Collections.Generic.IList<string> repositoryNames,
global::System.Collections.Generic.IList<global::GitHub.CustomPropertyValue> properties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial interface IOrgsClient
/// <param name="repositoryQuery"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::GitHub.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::GitHub.OrgRepoCustomPropertyValues>> OrgsListCustomPropertiesValuesForReposAsync(
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::GitHub.OrgRepoCustomPropertyValues>> OrgsCustomPropertiesForReposGetOrganizationValuesAsync(
string org,
int? perPage = default,
int? page = default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace GitHub.JsonConverters
{
/// <inheritdoc />
public sealed class SearchIssuesAndPullRequestsSearchTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::GitHub.SearchIssuesAndPullRequestsSearchType>
{
/// <inheritdoc />
public override global::GitHub.SearchIssuesAndPullRequestsSearchType Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::GitHub.SearchIssuesAndPullRequestsSearchType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::GitHub.SearchIssuesAndPullRequestsSearchType);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::GitHub.SearchIssuesAndPullRequestsSearchType value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace GitHub.JsonConverters
{
/// <inheritdoc />
public sealed class SearchIssuesAndPullRequestsSearchTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::GitHub.SearchIssuesAndPullRequestsSearchType?>
{
/// <inheritdoc />
public override global::GitHub.SearchIssuesAndPullRequestsSearchType? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::GitHub.SearchIssuesAndPullRequestsSearchType)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::GitHub.SearchIssuesAndPullRequestsSearchType?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::GitHub.SearchIssuesAndPullRequestsSearchType? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::GitHub.SearchIssuesAndPullRequestsSearchTypeExtensions.ToValueString(value.Value));
}
}
}
}
Loading
Loading