Handle error messages in the watcher (#150)

* Handle error messages in the watcher

* Fix documentation

* Fix typo
This commit is contained in:
Frederik Carlier
2018-04-28 05:51:02 +02:00
committed by Brendan Burns
parent 194211b370
commit 29a9c22644
4 changed files with 186 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
using Newtonsoft.Json;
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.
/// You can then
/// </remarks>
public class KubernetesObject
{
/// <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>
[JsonProperty(PropertyName = "apiVersion")]
public 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>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
}
}