2020-03-23 00:22:45 -04:00
|
|
|
namespace k8s.Models
|
|
|
|
|
{
|
2020-11-01 12:24:51 -08:00
|
|
|
public class KubernetesList<T> : IMetadata<V1ListMeta>, IItems<T>
|
|
|
|
|
where T : IKubernetesObject
|
2020-03-23 00:22:45 -04:00
|
|
|
{
|
2020-11-22 14:52:09 -08:00
|
|
|
public KubernetesList(IList<T> items, string apiVersion = default, string kind = default,
|
|
|
|
|
V1ListMeta metadata = default)
|
2020-03-23 00:22:45 -04:00
|
|
|
{
|
|
|
|
|
ApiVersion = apiVersion;
|
|
|
|
|
Items = items;
|
|
|
|
|
Kind = kind;
|
|
|
|
|
Metadata = metadata;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <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/sig-architecture/api-conventions.md#resources
|
|
|
|
|
/// </summary>
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("apiVersion")]
|
2020-03-23 00:22:45 -04:00
|
|
|
public string ApiVersion { get; set; }
|
|
|
|
|
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("items")]
|
2020-11-01 12:24:51 -08:00
|
|
|
public IList<T> Items { get; set; }
|
2020-03-23 00:22:45 -04:00
|
|
|
|
|
|
|
|
/// <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/sig-architecture/api-conventions.md#types-kinds
|
|
|
|
|
/// </summary>
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("kind")]
|
2020-03-23 00:22:45 -04:00
|
|
|
public string Kind { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets standard object's metadata.
|
|
|
|
|
/// </summary>
|
2021-12-13 07:31:59 -08:00
|
|
|
[JsonPropertyName("metadata")]
|
2020-03-23 00:22:45 -04:00
|
|
|
public V1ListMeta Metadata { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|