2018-05-03 07:04:47 +02:00
|
|
|
namespace k8s
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a generic Kubernetes object.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// You can use the <see cref="KubernetesObject"/> if you receive JSON from a Kubernetes API server but
|
|
|
|
|
/// are unsure which object the API server is about to return. You can parse the JSON as a <see cref="KubernetesObject"/>
|
|
|
|
|
/// and use the <see cref="ApiVersion"/> and <see cref="Kind"/> properties to get basic metadata about any Kubernetes object.
|
2018-09-27 10:50:39 -07:00
|
|
|
/// You can then
|
2018-05-03 07:04:47 +02:00
|
|
|
/// </remarks>
|
|
|
|
|
public interface IKubernetesObject
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets aPIVersion defines the versioned schema of this
|
|
|
|
|
/// representation of an object. Servers should convert recognized
|
|
|
|
|
/// schemas to the latest internal value, and may reject unrecognized
|
|
|
|
|
/// values. More info:
|
|
|
|
|
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
|
|
|
|
|
/// </summary>
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("apiVersion")]
|
2018-05-03 07:04:47 +02:00
|
|
|
string ApiVersion { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets kind is a string value representing the REST resource
|
|
|
|
|
/// this object represents. Servers may infer this from the endpoint
|
|
|
|
|
/// the client submits requests to. Cannot be updated. In CamelCase.
|
|
|
|
|
/// More info:
|
|
|
|
|
/// https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
|
|
|
|
|
/// </summary>
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("kind")]
|
2018-05-03 07:04:47 +02:00
|
|
|
string Kind { get; set; }
|
|
|
|
|
}
|
2020-04-09 15:13:48 -07:00
|
|
|
|
|
|
|
|
/// <summary>Represents a generic Kubernetes object that has an API version, a kind, and metadata.</summary>
|
2021-04-08 21:21:11 +03:00
|
|
|
/// <typeparam name="TMetadata">type of metadata</typeparam>
|
2020-04-09 15:13:48 -07:00
|
|
|
public interface IKubernetesObject<TMetadata> : IKubernetesObject, IMetadata<TMetadata>
|
|
|
|
|
{
|
|
|
|
|
}
|
2018-05-03 07:04:47 +02:00
|
|
|
}
|