/* * InfluxDB OSS API Service * * The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. * * OpenAPI spec version: 2.0.0 * * Generated by: https://github.com/openapitools/openapi-generator.git */ using System; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using OpenAPIDateConverter = InfluxDB.Client.Api.Client.OpenAPIDateConverter; namespace InfluxDB.Client.Api.Domain { /// /// CheckViewProperties /// [DataContract] public partial class CheckViewProperties : ViewProperties, IEquatable { /// /// Defines Type /// [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// /// Enum Check for value: check /// [EnumMember(Value = "check")] Check = 1 } /// /// Gets or Sets Type /// [DataMember(Name = "type", EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// /// Defines Shape /// [JsonConverter(typeof(StringEnumConverter))] public enum ShapeEnum { /// /// Enum ChronografV2 for value: chronograf-v2 /// [EnumMember(Value = "chronograf-v2")] ChronografV2 = 1 } /// /// Gets or Sets Shape /// [DataMember(Name = "shape", EmitDefaultValue = false)] public ShapeEnum Shape { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected CheckViewProperties() { } /// /// Initializes a new instance of the class. /// /// type (required) (default to TypeEnum.Check). /// shape (required) (default to ShapeEnum.ChronografV2). /// checkID (required). /// check. /// queries (required). /// Colors define color encoding of data into a visualization (required). /// legendColorizeRows. /// legendHide. /// legendOpacity. /// legendOrientationThreshold. public CheckViewProperties(TypeEnum type = TypeEnum.Check, ShapeEnum shape = ShapeEnum.ChronografV2, string checkID = default, Check check = default, List queries = default, List colors = default, bool? legendColorizeRows = default, bool? legendHide = default, float? legendOpacity = default, int? legendOrientationThreshold = default) : base() { // to ensure "type" is required (not null) Type = type; // to ensure "shape" is required (not null) Shape = shape; // to ensure "checkID" is required (not null) if (checkID == null) { throw new InvalidDataException( "checkID is a required property for CheckViewProperties and cannot be null"); } CheckID = checkID; // to ensure "queries" is required (not null) if (queries == null) { throw new InvalidDataException( "queries is a required property for CheckViewProperties and cannot be null"); } Queries = queries; // to ensure "colors" is required (not null) if (colors == null) { throw new InvalidDataException( "colors is a required property for CheckViewProperties and cannot be null"); } Colors = colors; Check = check; LegendColorizeRows = legendColorizeRows; LegendHide = legendHide; LegendOpacity = legendOpacity; LegendOrientationThreshold = legendOrientationThreshold; } /// /// Gets or Sets CheckID /// [DataMember(Name = "checkID", EmitDefaultValue = false)] public string CheckID { get; set; } /// /// Gets or Sets Check /// [DataMember(Name = "check", EmitDefaultValue = false)] public Check Check { get; set; } /// /// Gets or Sets Queries /// [DataMember(Name = "queries", EmitDefaultValue = false)] public List Queries { get; set; } /// /// Colors define color encoding of data into a visualization /// /// Colors define color encoding of data into a visualization [DataMember(Name = "colors", EmitDefaultValue = false)] public List Colors { get; set; } /// /// Gets or Sets LegendColorizeRows /// [DataMember(Name = "legendColorizeRows", EmitDefaultValue = false)] public bool? LegendColorizeRows { get; set; } /// /// Gets or Sets LegendHide /// [DataMember(Name = "legendHide", EmitDefaultValue = false)] public bool? LegendHide { get; set; } /// /// Gets or Sets LegendOpacity /// [DataMember(Name = "legendOpacity", EmitDefaultValue = false)] public float? LegendOpacity { get; set; } /// /// Gets or Sets LegendOrientationThreshold /// [DataMember(Name = "legendOrientationThreshold", EmitDefaultValue = false)] public int? LegendOrientationThreshold { get; set; } /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class CheckViewProperties {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Shape: ").Append(Shape).Append("\n"); sb.Append(" CheckID: ").Append(CheckID).Append("\n"); sb.Append(" Check: ").Append(Check).Append("\n"); sb.Append(" Queries: ").Append(Queries).Append("\n"); sb.Append(" Colors: ").Append(Colors).Append("\n"); sb.Append(" LegendColorizeRows: ").Append(LegendColorizeRows).Append("\n"); sb.Append(" LegendHide: ").Append(LegendHide).Append("\n"); sb.Append(" LegendOpacity: ").Append(LegendOpacity).Append("\n"); sb.Append(" LegendOrientationThreshold: ").Append(LegendOrientationThreshold).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public override string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object input) { return Equals(input as CheckViewProperties); } /// /// Returns true if CheckViewProperties instances are equal /// /// Instance of CheckViewProperties to be compared /// Boolean public bool Equals(CheckViewProperties input) { if (input == null) { return false; } return base.Equals(input) && ( Type == input.Type || Type.Equals(input.Type) ) && base.Equals(input) && ( Shape == input.Shape || Shape.Equals(input.Shape) ) && base.Equals(input) && ( CheckID == input.CheckID || CheckID != null && CheckID.Equals(input.CheckID) ) && base.Equals(input) && Check != null && Check.Equals(input.Check) && base.Equals(input) && ( Queries == input.Queries || Queries != null && Queries.SequenceEqual(input.Queries) ) && base.Equals(input) && ( Colors == input.Colors || Colors != null && Colors.SequenceEqual(input.Colors) ) && base.Equals(input) && ( LegendColorizeRows == input.LegendColorizeRows || LegendColorizeRows != null && LegendColorizeRows.Equals(input.LegendColorizeRows) ) && base.Equals(input) && ( LegendHide == input.LegendHide || LegendHide != null && LegendHide.Equals(input.LegendHide) ) && base.Equals(input) && ( LegendOpacity == input.LegendOpacity || LegendOpacity != null && LegendOpacity.Equals(input.LegendOpacity) ) && base.Equals(input) && ( LegendOrientationThreshold == input.LegendOrientationThreshold || LegendOrientationThreshold != null && LegendOrientationThreshold.Equals(input.LegendOrientationThreshold) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = base.GetHashCode(); hashCode = hashCode * 59 + Type.GetHashCode(); hashCode = hashCode * 59 + Shape.GetHashCode(); if (CheckID != null) { hashCode = hashCode * 59 + CheckID.GetHashCode(); } if (Check != null) { hashCode = hashCode * 59 + Check.GetHashCode(); } if (Queries != null) { hashCode = hashCode * 59 + Queries.GetHashCode(); } if (Colors != null) { hashCode = hashCode * 59 + Colors.GetHashCode(); } if (LegendColorizeRows != null) { hashCode = hashCode * 59 + LegendColorizeRows.GetHashCode(); } if (LegendHide != null) { hashCode = hashCode * 59 + LegendHide.GetHashCode(); } if (LegendOpacity != null) { hashCode = hashCode * 59 + LegendOpacity.GetHashCode(); } if (LegendOrientationThreshold != null) { hashCode = hashCode * 59 + LegendOrientationThreshold.GetHashCode(); } return hashCode; } } } }