Files
csharp/src/generated/Models/V1Event.cs
2017-06-16 10:47:10 -07:00

178 lines
7.5 KiB
C#
Executable File

// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// 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;
/// <summary>
/// Event is a report of an event somewhere in the cluster.
/// </summary>
public partial class V1Event
{
/// <summary>
/// Initializes a new instance of the V1Event class.
/// </summary>
public V1Event()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the V1Event class.
/// </summary>
/// <param name="involvedObject">The object that this event is
/// about.</param>
/// <param name="metadata">Standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata</param>
/// <param name="apiVersion">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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources</param>
/// <param name="count">The number of times this event has
/// occurred.</param>
/// <param name="firstTimestamp">The time at which the event was first
/// recorded. (Time of server receipt is in TypeMeta.)</param>
/// <param name="kind">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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds</param>
/// <param name="lastTimestamp">The time at which the most recent
/// occurrence of this event was recorded.</param>
/// <param name="message">A human-readable description of the status of
/// this operation.</param>
/// <param name="reason">This should be a short, machine understandable
/// string that gives the reason for the transition into the object's
/// current status.</param>
/// <param name="source">The component reporting this event. Should be
/// a short machine understandable string.</param>
/// <param name="type">Type of this event (Normal, Warning), new types
/// could be added in the future</param>
public V1Event(V1ObjectReference involvedObject, V1ObjectMeta metadata, string apiVersion = default(string), int? count = default(int?), System.DateTime? firstTimestamp = default(System.DateTime?), string kind = default(string), System.DateTime? lastTimestamp = default(System.DateTime?), string message = default(string), string reason = default(string), V1EventSource source = default(V1EventSource), string type = default(string))
{
ApiVersion = apiVersion;
Count = count;
FirstTimestamp = firstTimestamp;
InvolvedObject = involvedObject;
Kind = kind;
LastTimestamp = lastTimestamp;
Message = message;
Metadata = metadata;
Reason = reason;
Source = source;
Type = type;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
/// </summary>
[JsonProperty(PropertyName = "apiVersion")]
public string ApiVersion { get; set; }
/// <summary>
/// Gets or sets the number of times this event has occurred.
/// </summary>
[JsonProperty(PropertyName = "count")]
public int? Count { get; set; }
/// <summary>
/// Gets or sets the time at which the event was first recorded. (Time
/// of server receipt is in TypeMeta.)
/// </summary>
[JsonProperty(PropertyName = "firstTimestamp")]
public System.DateTime? FirstTimestamp { get; set; }
/// <summary>
/// Gets or sets the object that this event is about.
/// </summary>
[JsonProperty(PropertyName = "involvedObject")]
public V1ObjectReference InvolvedObject { 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:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
/// </summary>
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// Gets or sets the time at which the most recent occurrence of this
/// event was recorded.
/// </summary>
[JsonProperty(PropertyName = "lastTimestamp")]
public System.DateTime? LastTimestamp { get; set; }
/// <summary>
/// Gets or sets a human-readable description of the status of this
/// operation.
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Gets or sets standard object's metadata. More info:
/// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
/// </summary>
[JsonProperty(PropertyName = "metadata")]
public V1ObjectMeta Metadata { get; set; }
/// <summary>
/// Gets or sets this should be a short, machine understandable string
/// that gives the reason for the transition into the object's current
/// status.
/// </summary>
[JsonProperty(PropertyName = "reason")]
public string Reason { get; set; }
/// <summary>
/// Gets or sets the component reporting this event. Should be a short
/// machine understandable string.
/// </summary>
[JsonProperty(PropertyName = "source")]
public V1EventSource Source { get; set; }
/// <summary>
/// Gets or sets type of this event (Normal, Warning), new types could
/// be added in the future
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (InvolvedObject == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "InvolvedObject");
}
if (Metadata == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Metadata");
}
}
}
}