2020-12-19 11:26:25 -05:00
using k8s ;
using k8s.Models ;
2021-10-14 18:02:51 +02:00
using System.Collections.Generic ;
2022-03-07 10:06:55 -08:00
using System.Text.Json.Serialization ;
2020-12-19 11:26:25 -05:00
[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "CA1724:TypeNamesShouldNotMatchNamespaces", Justification = "This is just an example.")]
[module: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleClass", Justification = "This is just an example.")]
namespace customResource
{
public class CustomResourceDefinition
{
public string Version { get ; set ; }
public string Group { get ; set ; }
public string PluralName { get ; set ; }
public string Kind { get ; set ; }
public string Namespace { get ; set ; }
}
2022-09-12 09:47:24 +02:00
public abstract class CustomResource : KubernetesObject , IMetadata < V1ObjectMeta >
2020-12-19 11:26:25 -05:00
{
2022-03-07 10:06:55 -08:00
[JsonPropertyName("metadata")]
2020-12-19 11:26:25 -05:00
public V1ObjectMeta Metadata { get ; set ; }
}
public abstract class CustomResource < TSpec , TStatus > : CustomResource
{
2022-03-07 10:06:55 -08:00
[JsonPropertyName("spec")]
2020-12-19 11:26:25 -05:00
public TSpec Spec { get ; set ; }
2022-03-07 10:06:55 -08:00
[JsonPropertyName("CStatus")]
2020-12-19 11:26:25 -05:00
public TStatus CStatus { get ; set ; }
}
public class CustomResourceList < T > : KubernetesObject
where T : CustomResource
{
public V1ListMeta Metadata { get ; set ; }
public List < T > Items { get ; set ; }
}
}