/* * 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 { /// /// MosaicViewProperties /// [DataContract] public partial class MosaicViewProperties : ViewProperties, IEquatable { /// /// Defines Type /// [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// /// Enum Mosaic for value: mosaic /// [EnumMember(Value = "mosaic")] Mosaic = 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; } /// /// Defines HoverDimension /// [JsonConverter(typeof(StringEnumConverter))] public enum HoverDimensionEnum { /// /// Enum Auto for value: auto /// [EnumMember(Value = "auto")] Auto = 1, /// /// Enum X for value: x /// [EnumMember(Value = "x")] X = 2, /// /// Enum Y for value: y /// [EnumMember(Value = "y")] Y = 3, /// /// Enum Xy for value: xy /// [EnumMember(Value = "xy")] Xy = 4 } /// /// Gets or Sets HoverDimension /// [DataMember(Name = "hoverDimension", EmitDefaultValue = false)] public HoverDimensionEnum? HoverDimension { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected MosaicViewProperties() { } /// /// Initializes a new instance of the class. /// /// timeFormat. /// type (required) (default to TypeEnum.Mosaic). /// queries (required). /// Colors define color encoding of data into a visualization (required). /// shape (required) (default to ShapeEnum.ChronografV2). /// note (required). /// If true, will display note when empty (required). /// xColumn (required). /// generateXAxisTicks. /// xTotalTicks. /// xTickStart. /// xTickStep. /// yLabelColumnSeparator. /// yLabelColumns. /// ySeriesColumns (required). /// fillColumns (required). /// xDomain (required). /// yDomain (required). /// xAxisLabel (required). /// yAxisLabel (required). /// xPrefix (required). /// xSuffix (required). /// yPrefix (required). /// ySuffix (required). /// hoverDimension. /// legendColorizeRows. /// legendHide. /// legendOpacity. /// legendOrientationThreshold. public MosaicViewProperties(string timeFormat = default, TypeEnum type = TypeEnum.Mosaic, List queries = default, List colors = default, ShapeEnum shape = ShapeEnum.ChronografV2, string note = default, bool? showNoteWhenEmpty = default, string xColumn = default, List generateXAxisTicks = default, int? xTotalTicks = default, float? xTickStart = default, float? xTickStep = default, string yLabelColumnSeparator = default, List yLabelColumns = default, List ySeriesColumns = default, List fillColumns = default, List xDomain = default, List yDomain = default, string xAxisLabel = default, string yAxisLabel = default, string xPrefix = default, string xSuffix = default, string yPrefix = default, string ySuffix = default, HoverDimensionEnum? hoverDimension = 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 "queries" is required (not null) if (queries == null) { throw new InvalidDataException( "queries is a required property for MosaicViewProperties 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 MosaicViewProperties and cannot be null"); } Colors = colors; // to ensure "shape" is required (not null) Shape = shape; // to ensure "note" is required (not null) if (note == null) { throw new InvalidDataException( "note is a required property for MosaicViewProperties and cannot be null"); } Note = note; // to ensure "showNoteWhenEmpty" is required (not null) if (showNoteWhenEmpty == null) { throw new InvalidDataException( "showNoteWhenEmpty is a required property for MosaicViewProperties and cannot be null"); } ShowNoteWhenEmpty = showNoteWhenEmpty; // to ensure "xColumn" is required (not null) if (xColumn == null) { throw new InvalidDataException( "xColumn is a required property for MosaicViewProperties and cannot be null"); } XColumn = xColumn; // to ensure "ySeriesColumns" is required (not null) if (ySeriesColumns == null) { throw new InvalidDataException( "ySeriesColumns is a required property for MosaicViewProperties and cannot be null"); } YSeriesColumns = ySeriesColumns; // to ensure "fillColumns" is required (not null) if (fillColumns == null) { throw new InvalidDataException( "fillColumns is a required property for MosaicViewProperties and cannot be null"); } FillColumns = fillColumns; // to ensure "xDomain" is required (not null) if (xDomain == null) { throw new InvalidDataException( "xDomain is a required property for MosaicViewProperties and cannot be null"); } XDomain = xDomain; // to ensure "yDomain" is required (not null) if (yDomain == null) { throw new InvalidDataException( "yDomain is a required property for MosaicViewProperties and cannot be null"); } YDomain = yDomain; // to ensure "xAxisLabel" is required (not null) if (xAxisLabel == null) { throw new InvalidDataException( "xAxisLabel is a required property for MosaicViewProperties and cannot be null"); } XAxisLabel = xAxisLabel; // to ensure "yAxisLabel" is required (not null) if (yAxisLabel == null) { throw new InvalidDataException( "yAxisLabel is a required property for MosaicViewProperties and cannot be null"); } YAxisLabel = yAxisLabel; // to ensure "xPrefix" is required (not null) if (xPrefix == null) { throw new InvalidDataException( "xPrefix is a required property for MosaicViewProperties and cannot be null"); } XPrefix = xPrefix; // to ensure "xSuffix" is required (not null) if (xSuffix == null) { throw new InvalidDataException( "xSuffix is a required property for MosaicViewProperties and cannot be null"); } XSuffix = xSuffix; // to ensure "yPrefix" is required (not null) if (yPrefix == null) { throw new InvalidDataException( "yPrefix is a required property for MosaicViewProperties and cannot be null"); } YPrefix = yPrefix; // to ensure "ySuffix" is required (not null) if (ySuffix == null) { throw new InvalidDataException( "ySuffix is a required property for MosaicViewProperties and cannot be null"); } YSuffix = ySuffix; TimeFormat = timeFormat; GenerateXAxisTicks = generateXAxisTicks; XTotalTicks = xTotalTicks; XTickStart = xTickStart; XTickStep = xTickStep; YLabelColumnSeparator = yLabelColumnSeparator; YLabelColumns = yLabelColumns; HoverDimension = hoverDimension; LegendColorizeRows = legendColorizeRows; LegendHide = legendHide; LegendOpacity = legendOpacity; LegendOrientationThreshold = legendOrientationThreshold; } /// /// Gets or Sets TimeFormat /// [DataMember(Name = "timeFormat", EmitDefaultValue = false)] public string TimeFormat { 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 Note /// [DataMember(Name = "note", EmitDefaultValue = false)] public string Note { get; set; } /// /// If true, will display note when empty /// /// If true, will display note when empty [DataMember(Name = "showNoteWhenEmpty", EmitDefaultValue = false)] public bool? ShowNoteWhenEmpty { get; set; } /// /// Gets or Sets XColumn /// [DataMember(Name = "xColumn", EmitDefaultValue = false)] public string XColumn { get; set; } /// /// Gets or Sets GenerateXAxisTicks /// [DataMember(Name = "generateXAxisTicks", EmitDefaultValue = false)] public List GenerateXAxisTicks { get; set; } /// /// Gets or Sets XTotalTicks /// [DataMember(Name = "xTotalTicks", EmitDefaultValue = false)] public int? XTotalTicks { get; set; } /// /// Gets or Sets XTickStart /// [DataMember(Name = "xTickStart", EmitDefaultValue = false)] public float? XTickStart { get; set; } /// /// Gets or Sets XTickStep /// [DataMember(Name = "xTickStep", EmitDefaultValue = false)] public float? XTickStep { get; set; } /// /// Gets or Sets YLabelColumnSeparator /// [DataMember(Name = "yLabelColumnSeparator", EmitDefaultValue = false)] public string YLabelColumnSeparator { get; set; } /// /// Gets or Sets YLabelColumns /// [DataMember(Name = "yLabelColumns", EmitDefaultValue = false)] public List YLabelColumns { get; set; } /// /// Gets or Sets YSeriesColumns /// [DataMember(Name = "ySeriesColumns", EmitDefaultValue = false)] public List YSeriesColumns { get; set; } /// /// Gets or Sets FillColumns /// [DataMember(Name = "fillColumns", EmitDefaultValue = false)] public List FillColumns { get; set; } /// /// Gets or Sets XDomain /// [DataMember(Name = "xDomain", EmitDefaultValue = false)] public List XDomain { get; set; } /// /// Gets or Sets YDomain /// [DataMember(Name = "yDomain", EmitDefaultValue = false)] public List YDomain { get; set; } /// /// Gets or Sets XAxisLabel /// [DataMember(Name = "xAxisLabel", EmitDefaultValue = false)] public string XAxisLabel { get; set; } /// /// Gets or Sets YAxisLabel /// [DataMember(Name = "yAxisLabel", EmitDefaultValue = false)] public string YAxisLabel { get; set; } /// /// Gets or Sets XPrefix /// [DataMember(Name = "xPrefix", EmitDefaultValue = false)] public string XPrefix { get; set; } /// /// Gets or Sets XSuffix /// [DataMember(Name = "xSuffix", EmitDefaultValue = false)] public string XSuffix { get; set; } /// /// Gets or Sets YPrefix /// [DataMember(Name = "yPrefix", EmitDefaultValue = false)] public string YPrefix { get; set; } /// /// Gets or Sets YSuffix /// [DataMember(Name = "ySuffix", EmitDefaultValue = false)] public string YSuffix { 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 MosaicViewProperties {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" TimeFormat: ").Append(TimeFormat).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Queries: ").Append(Queries).Append("\n"); sb.Append(" Colors: ").Append(Colors).Append("\n"); sb.Append(" Shape: ").Append(Shape).Append("\n"); sb.Append(" Note: ").Append(Note).Append("\n"); sb.Append(" ShowNoteWhenEmpty: ").Append(ShowNoteWhenEmpty).Append("\n"); sb.Append(" XColumn: ").Append(XColumn).Append("\n"); sb.Append(" GenerateXAxisTicks: ").Append(GenerateXAxisTicks).Append("\n"); sb.Append(" XTotalTicks: ").Append(XTotalTicks).Append("\n"); sb.Append(" XTickStart: ").Append(XTickStart).Append("\n"); sb.Append(" XTickStep: ").Append(XTickStep).Append("\n"); sb.Append(" YLabelColumnSeparator: ").Append(YLabelColumnSeparator).Append("\n"); sb.Append(" YLabelColumns: ").Append(YLabelColumns).Append("\n"); sb.Append(" YSeriesColumns: ").Append(YSeriesColumns).Append("\n"); sb.Append(" FillColumns: ").Append(FillColumns).Append("\n"); sb.Append(" XDomain: ").Append(XDomain).Append("\n"); sb.Append(" YDomain: ").Append(YDomain).Append("\n"); sb.Append(" XAxisLabel: ").Append(XAxisLabel).Append("\n"); sb.Append(" YAxisLabel: ").Append(YAxisLabel).Append("\n"); sb.Append(" XPrefix: ").Append(XPrefix).Append("\n"); sb.Append(" XSuffix: ").Append(XSuffix).Append("\n"); sb.Append(" YPrefix: ").Append(YPrefix).Append("\n"); sb.Append(" YSuffix: ").Append(YSuffix).Append("\n"); sb.Append(" HoverDimension: ").Append(HoverDimension).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 MosaicViewProperties); } /// /// Returns true if MosaicViewProperties instances are equal /// /// Instance of MosaicViewProperties to be compared /// Boolean public bool Equals(MosaicViewProperties input) { if (input == null) { return false; } return base.Equals(input) && ( TimeFormat == input.TimeFormat || TimeFormat != null && TimeFormat.Equals(input.TimeFormat) ) && base.Equals(input) && ( Type == input.Type || Type.Equals(input.Type) ) && 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) && ( Shape == input.Shape || Shape.Equals(input.Shape) ) && base.Equals(input) && ( Note == input.Note || Note != null && Note.Equals(input.Note) ) && base.Equals(input) && ( ShowNoteWhenEmpty == input.ShowNoteWhenEmpty || ShowNoteWhenEmpty != null && ShowNoteWhenEmpty.Equals(input.ShowNoteWhenEmpty) ) && base.Equals(input) && ( XColumn == input.XColumn || XColumn != null && XColumn.Equals(input.XColumn) ) && base.Equals(input) && ( GenerateXAxisTicks == input.GenerateXAxisTicks || GenerateXAxisTicks != null && GenerateXAxisTicks.SequenceEqual(input.GenerateXAxisTicks) ) && base.Equals(input) && ( XTotalTicks == input.XTotalTicks || XTotalTicks != null && XTotalTicks.Equals(input.XTotalTicks) ) && base.Equals(input) && ( XTickStart == input.XTickStart || XTickStart != null && XTickStart.Equals(input.XTickStart) ) && base.Equals(input) && ( XTickStep == input.XTickStep || XTickStep != null && XTickStep.Equals(input.XTickStep) ) && base.Equals(input) && ( YLabelColumnSeparator == input.YLabelColumnSeparator || YLabelColumnSeparator != null && YLabelColumnSeparator.Equals(input.YLabelColumnSeparator) ) && base.Equals(input) && ( YLabelColumns == input.YLabelColumns || YLabelColumns != null && YLabelColumns.SequenceEqual(input.YLabelColumns) ) && base.Equals(input) && ( YSeriesColumns == input.YSeriesColumns || YSeriesColumns != null && YSeriesColumns.SequenceEqual(input.YSeriesColumns) ) && base.Equals(input) && ( FillColumns == input.FillColumns || FillColumns != null && FillColumns.SequenceEqual(input.FillColumns) ) && base.Equals(input) && ( XDomain == input.XDomain || XDomain != null && XDomain.SequenceEqual(input.XDomain) ) && base.Equals(input) && ( YDomain == input.YDomain || YDomain != null && YDomain.SequenceEqual(input.YDomain) ) && base.Equals(input) && ( XAxisLabel == input.XAxisLabel || XAxisLabel != null && XAxisLabel.Equals(input.XAxisLabel) ) && base.Equals(input) && ( YAxisLabel == input.YAxisLabel || YAxisLabel != null && YAxisLabel.Equals(input.YAxisLabel) ) && base.Equals(input) && ( XPrefix == input.XPrefix || XPrefix != null && XPrefix.Equals(input.XPrefix) ) && base.Equals(input) && ( XSuffix == input.XSuffix || XSuffix != null && XSuffix.Equals(input.XSuffix) ) && base.Equals(input) && ( YPrefix == input.YPrefix || YPrefix != null && YPrefix.Equals(input.YPrefix) ) && base.Equals(input) && ( YSuffix == input.YSuffix || YSuffix != null && YSuffix.Equals(input.YSuffix) ) && base.Equals(input) && ( HoverDimension == input.HoverDimension || HoverDimension.Equals(input.HoverDimension) ) && 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(); if (TimeFormat != null) { hashCode = hashCode * 59 + TimeFormat.GetHashCode(); } hashCode = hashCode * 59 + Type.GetHashCode(); if (Queries != null) { hashCode = hashCode * 59 + Queries.GetHashCode(); } if (Colors != null) { hashCode = hashCode * 59 + Colors.GetHashCode(); } hashCode = hashCode * 59 + Shape.GetHashCode(); if (Note != null) { hashCode = hashCode * 59 + Note.GetHashCode(); } if (ShowNoteWhenEmpty != null) { hashCode = hashCode * 59 + ShowNoteWhenEmpty.GetHashCode(); } if (XColumn != null) { hashCode = hashCode * 59 + XColumn.GetHashCode(); } if (GenerateXAxisTicks != null) { hashCode = hashCode * 59 + GenerateXAxisTicks.GetHashCode(); } if (XTotalTicks != null) { hashCode = hashCode * 59 + XTotalTicks.GetHashCode(); } if (XTickStart != null) { hashCode = hashCode * 59 + XTickStart.GetHashCode(); } if (XTickStep != null) { hashCode = hashCode * 59 + XTickStep.GetHashCode(); } if (YLabelColumnSeparator != null) { hashCode = hashCode * 59 + YLabelColumnSeparator.GetHashCode(); } if (YLabelColumns != null) { hashCode = hashCode * 59 + YLabelColumns.GetHashCode(); } if (YSeriesColumns != null) { hashCode = hashCode * 59 + YSeriesColumns.GetHashCode(); } if (FillColumns != null) { hashCode = hashCode * 59 + FillColumns.GetHashCode(); } if (XDomain != null) { hashCode = hashCode * 59 + XDomain.GetHashCode(); } if (YDomain != null) { hashCode = hashCode * 59 + YDomain.GetHashCode(); } if (XAxisLabel != null) { hashCode = hashCode * 59 + XAxisLabel.GetHashCode(); } if (YAxisLabel != null) { hashCode = hashCode * 59 + YAxisLabel.GetHashCode(); } if (XPrefix != null) { hashCode = hashCode * 59 + XPrefix.GetHashCode(); } if (XSuffix != null) { hashCode = hashCode * 59 + XSuffix.GetHashCode(); } if (YPrefix != null) { hashCode = hashCode * 59 + YPrefix.GetHashCode(); } if (YSuffix != null) { hashCode = hashCode * 59 + YSuffix.GetHashCode(); } hashCode = hashCode * 59 + HoverDimension.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; } } } }