// // 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; /// /// ExternalMetricStatus indicates the current value of a global metric not /// associated with any Kubernetes object. /// public partial class V2beta2ExternalMetricStatus { /// /// Initializes a new instance of the V2beta2ExternalMetricStatus /// class. /// public V2beta2ExternalMetricStatus() { CustomInit(); } /// /// Initializes a new instance of the V2beta2ExternalMetricStatus /// class. /// /// current contains the current value for the /// given metric /// metric identifies the target metric by name /// and selector public V2beta2ExternalMetricStatus(V2beta2MetricValueStatus current, V2beta2MetricIdentifier metric) { Current = current; Metric = metric; CustomInit(); } /// /// An initialization method that performs custom operations like setting defaults /// partial void CustomInit(); /// /// Gets or sets current contains the current value for the given /// metric /// [JsonProperty(PropertyName = "current")] public V2beta2MetricValueStatus Current { get; set; } /// /// Gets or sets metric identifies the target metric by name and /// selector /// [JsonProperty(PropertyName = "metric")] public V2beta2MetricIdentifier Metric { get; set; } /// /// Validate the object. /// /// /// Thrown if validation fails /// public virtual void Validate() { if (Current == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Current"); } if (Metric == null) { throw new ValidationException(ValidationRules.CannotBeNull, "Metric"); } if (Metric != null) { Metric.Validate(); } } } }