// // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. // namespace k8s.Models { using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; /// /// ContainerStatus contains details for the current status of this /// container. /// public partial class V1ContainerStatus { /// /// Initializes a new instance of the V1ContainerStatus class. /// public V1ContainerStatus() { CustomInit(); } /// /// Initializes a new instance of the V1ContainerStatus class. /// /// The image the container is running. More info: /// https://kubernetes.io/docs/concepts/containers/images /// ImageID of the container's image. /// This must be a DNS_LABEL. Each container in a /// pod must have a unique name. Cannot be updated. /// Specifies whether the container has passed its /// readiness probe. /// The number of times the container has /// been restarted, currently based on the number of dead containers /// that have not yet been removed. Note that this is calculated from /// dead containers. But those containers are subject to garbage /// collection. This value will get capped at 5 by GC. /// Container's ID in the format /// 'docker://<container_id>'. /// Details about the container's last /// termination condition. /// Details about the container's current /// condition. public V1ContainerStatus(string image, string imageID, string name, bool ready, int restartCount, string containerID = default(string), V1ContainerState lastState = default(V1ContainerState), V1ContainerState state = default(V1ContainerState)) { ContainerID = containerID; Image = image; ImageID = imageID; LastState = lastState; Name = name; Ready = ready; RestartCount = restartCount; State = state; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets container's ID in the format /// 'docker://&lt;container_id&gt;'. /// [JsonProperty(PropertyName = "containerID")] public string ContainerID { get; set; } /// /// Gets or sets the image the container is running. More info: /// https://kubernetes.io/docs/concepts/containers/images /// [JsonProperty(PropertyName = "image")] public string Image { get; set; } /// /// Gets or sets imageID of the container's image. /// [JsonProperty(PropertyName = "imageID")] public string ImageID { get; set; } /// /// Gets or sets details about the container's last termination /// condition. /// [JsonProperty(PropertyName = "lastState")] public V1ContainerState LastState { get; set; } /// /// Gets or sets this must be a DNS_LABEL. Each container in a pod must /// have a unique name. Cannot be updated. /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets specifies whether the container has passed its /// readiness probe. /// [JsonProperty(PropertyName = "ready")] public bool Ready { get; set; } /// /// Gets or sets the number of times the container has been restarted, /// currently based on the number of dead containers that have not yet /// been removed. Note that this is calculated from dead containers. /// But those containers are subject to garbage collection. This value /// will get capped at 5 by GC. /// [JsonProperty(PropertyName = "restartCount")] public int RestartCount { get; set; } /// /// Gets or sets details about the container's current condition. /// [JsonProperty(PropertyName = "state")] public V1ContainerState State { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Image == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Image"); } if (ImageID == null) { throw new ValidationException(ValidationRules.CannotBeNull, "ImageID"); } if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } if (LastState != null) { LastState.Validate(); } if (State != null) { State.Validate(); } } } }