// // 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.Collections; using System.Collections.Generic; using System.Linq; /// /// HTTPGetAction describes an action based on HTTP Get requests. /// public partial class V1HTTPGetAction { /// /// Initializes a new instance of the V1HTTPGetAction class. /// public V1HTTPGetAction() { CustomInit(); } /// /// Initializes a new instance of the V1HTTPGetAction class. /// /// Name or number of the port to access on the /// container. Number must be in the range 1 to 65535. Name must be an /// IANA_SVC_NAME. /// Host name to connect to, defaults to the pod IP. /// You probably want to set "Host" in httpHeaders instead. /// Custom headers to set in the request. /// HTTP allows repeated headers. /// Path to access on the HTTP server. /// Scheme to use for connecting to the host. /// Defaults to HTTP. public V1HTTPGetAction(IntstrIntOrString port, string host = default(string), IList httpHeaders = default(IList), string path = default(string), string scheme = default(string)) { Host = host; HttpHeaders = httpHeaders; Path = path; Port = port; Scheme = scheme; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets host name to connect to, defaults to the pod IP. You /// probably want to set "Host" in httpHeaders instead. /// [JsonProperty(PropertyName = "host")] public string Host { get; set; } /// /// Gets or sets custom headers to set in the request. HTTP allows /// repeated headers. /// [JsonProperty(PropertyName = "httpHeaders")] public IList HttpHeaders { get; set; } /// /// Gets or sets path to access on the HTTP server. /// [JsonProperty(PropertyName = "path")] public string Path { get; set; } /// /// Gets or sets name or number of the port to access on the container. /// Number must be in the range 1 to 65535. Name must be an /// IANA_SVC_NAME. /// [JsonProperty(PropertyName = "port")] public IntstrIntOrString Port { get; set; } /// /// Gets or sets scheme to use for connecting to the host. Defaults to /// HTTP. /// [JsonProperty(PropertyName = "scheme")] public string Scheme { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Port == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Port"); } if (HttpHeaders != null) { foreach (var element in HttpHeaders) { if (element != null) { element.Validate(); } } } } } }