/*
* 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
{
///
/// StaticLegend represents the options specific to the static legend
///
[DataContract]
public partial class StaticLegend : IEquatable
{
///
/// Initializes a new instance of the class.
///
/// colorizeRows.
/// heightRatio.
/// show.
/// opacity.
/// orientationThreshold.
/// valueAxis.
/// widthRatio.
public StaticLegend(bool? colorizeRows = default, float? heightRatio = default, bool? show = default,
float? opacity = default, int? orientationThreshold = default, string valueAxis = default,
float? widthRatio = default)
{
ColorizeRows = colorizeRows;
HeightRatio = heightRatio;
Show = show;
Opacity = opacity;
OrientationThreshold = orientationThreshold;
ValueAxis = valueAxis;
WidthRatio = widthRatio;
}
///
/// Gets or Sets ColorizeRows
///
[DataMember(Name = "colorizeRows", EmitDefaultValue = false)]
public bool? ColorizeRows { get; set; }
///
/// Gets or Sets HeightRatio
///
[DataMember(Name = "heightRatio", EmitDefaultValue = false)]
public float? HeightRatio { get; set; }
///
/// Gets or Sets Show
///
[DataMember(Name = "show", EmitDefaultValue = false)]
public bool? Show { get; set; }
///
/// Gets or Sets Opacity
///
[DataMember(Name = "opacity", EmitDefaultValue = false)]
public float? Opacity { get; set; }
///
/// Gets or Sets OrientationThreshold
///
[DataMember(Name = "orientationThreshold", EmitDefaultValue = false)]
public int? OrientationThreshold { get; set; }
///
/// Gets or Sets ValueAxis
///
[DataMember(Name = "valueAxis", EmitDefaultValue = false)]
public string ValueAxis { get; set; }
///
/// Gets or Sets WidthRatio
///
[DataMember(Name = "widthRatio", EmitDefaultValue = false)]
public float? WidthRatio { 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 StaticLegend {\n");
sb.Append(" ColorizeRows: ").Append(ColorizeRows).Append("\n");
sb.Append(" HeightRatio: ").Append(HeightRatio).Append("\n");
sb.Append(" Show: ").Append(Show).Append("\n");
sb.Append(" Opacity: ").Append(Opacity).Append("\n");
sb.Append(" OrientationThreshold: ").Append(OrientationThreshold).Append("\n");
sb.Append(" ValueAxis: ").Append(ValueAxis).Append("\n");
sb.Append(" WidthRatio: ").Append(WidthRatio).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public virtual 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 StaticLegend);
}
///
/// Returns true if StaticLegend instances are equal
///
/// Instance of StaticLegend to be compared
/// Boolean
public bool Equals(StaticLegend input)
{
if (input == null)
{
return false;
}
return
(
ColorizeRows == input.ColorizeRows ||
ColorizeRows != null && ColorizeRows.Equals(input.ColorizeRows)
) &&
(
HeightRatio == input.HeightRatio ||
HeightRatio != null && HeightRatio.Equals(input.HeightRatio)
) &&
(
Show == input.Show ||
Show != null && Show.Equals(input.Show)
) &&
(
Opacity == input.Opacity ||
Opacity != null && Opacity.Equals(input.Opacity)
) &&
(
OrientationThreshold == input.OrientationThreshold ||
OrientationThreshold != null && OrientationThreshold.Equals(input.OrientationThreshold)
) &&
(
ValueAxis == input.ValueAxis ||
ValueAxis != null && ValueAxis.Equals(input.ValueAxis)
) &&
(
WidthRatio == input.WidthRatio ||
WidthRatio != null && WidthRatio.Equals(input.WidthRatio)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
if (ColorizeRows != null)
{
hashCode = hashCode * 59 + ColorizeRows.GetHashCode();
}
if (HeightRatio != null)
{
hashCode = hashCode * 59 + HeightRatio.GetHashCode();
}
if (Show != null)
{
hashCode = hashCode * 59 + Show.GetHashCode();
}
if (Opacity != null)
{
hashCode = hashCode * 59 + Opacity.GetHashCode();
}
if (OrientationThreshold != null)
{
hashCode = hashCode * 59 + OrientationThreshold.GetHashCode();
}
if (ValueAxis != null)
{
hashCode = hashCode * 59 + ValueAxis.GetHashCode();
}
if (WidthRatio != null)
{
hashCode = hashCode * 59 + WidthRatio.GetHashCode();
}
return hashCode;
}
}
}
}