// // 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; /// /// HTTPHeader describes a custom header to be used in HTTP probes /// public partial class V1HTTPHeader { /// /// Initializes a new instance of the V1HTTPHeader class. /// public V1HTTPHeader() { CustomInit(); } /// /// Initializes a new instance of the V1HTTPHeader class. /// /// The header field name /// The header field value public V1HTTPHeader(string name, string value) { Name = name; Value = value; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets the header field name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// Gets or sets the header field value /// [JsonProperty(PropertyName = "value")] public string Value { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Name == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } if (Value == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Value"); } } } }