Files
csharp/src/KubernetesClient/V1Patch.cs

35 lines
721 B
C#
Raw Normal View History

using System;
using Microsoft.AspNetCore.JsonPatch;
using Newtonsoft.Json;
namespace k8s.Models
{
[JsonConverter(typeof(V1PathJsonConverter))]
public partial class V1Patch
{
public enum PathType
{
JsonPatch,
MergePatch,
StrategicMergePatch,
}
public PathType Type { get; private set; }
2020-04-22 12:15:45 -07:00
public V1Patch(IJsonPatchDocument jsonPatch) : this((object)jsonPatch)
{
}
partial void CustomInit()
{
if (Content is IJsonPatchDocument)
{
Type = PathType.JsonPatch;
return;
}
throw new NotSupportedException();
}
}
}