/*
* 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
{
///
/// Axis used in a visualization.
///
[DataContract]
public partial class Axis : IEquatable
{
///
/// Radix for formatting axis values.
///
/// Radix for formatting axis values.
[JsonConverter(typeof(StringEnumConverter))]
public enum BaseEnum
{
///
/// Enum Empty for value:
///
[EnumMember(Value = "")] Empty = 1,
///
/// Enum _2 for value: 2
///
[EnumMember(Value = "2")] _2 = 2,
///
/// Enum _10 for value: 10
///
[EnumMember(Value = "10")] _10 = 3
}
///
/// Radix for formatting axis values.
///
/// Radix for formatting axis values.
[DataMember(Name = "base", EmitDefaultValue = false)]
public BaseEnum? Base { get; set; }
///
/// Gets or Sets Scale
///
[DataMember(Name = "scale", EmitDefaultValue = false)]
public AxisScale? Scale { get; set; }
///
/// Initializes a new instance of the class.
///
/// The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits..
/// Description of the axis..
/// Label prefix for formatting axis values..
/// Label suffix for formatting axis values..
/// Radix for formatting axis values..
/// scale.
public Axis(List bounds = default, string label = default, string prefix = default,
string suffix = default, BaseEnum? _base = default, AxisScale? scale = default)
{
Bounds = bounds;
Label = label;
Prefix = prefix;
Suffix = suffix;
Base = _base;
Scale = scale;
}
///
/// The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits.
///
/// The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits.
[DataMember(Name = "bounds", EmitDefaultValue = false)]
public List Bounds { get; set; }
///
/// Description of the axis.
///
/// Description of the axis.
[DataMember(Name = "label", EmitDefaultValue = false)]
public string Label { get; set; }
///
/// Label prefix for formatting axis values.
///
/// Label prefix for formatting axis values.
[DataMember(Name = "prefix", EmitDefaultValue = false)]
public string Prefix { get; set; }
///
/// Label suffix for formatting axis values.
///
/// Label suffix for formatting axis values.
[DataMember(Name = "suffix", EmitDefaultValue = false)]
public string Suffix { 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 Axis {\n");
sb.Append(" Bounds: ").Append(Bounds).Append("\n");
sb.Append(" Label: ").Append(Label).Append("\n");
sb.Append(" Prefix: ").Append(Prefix).Append("\n");
sb.Append(" Suffix: ").Append(Suffix).Append("\n");
sb.Append(" Base: ").Append(Base).Append("\n");
sb.Append(" Scale: ").Append(Scale).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 Axis);
}
///
/// Returns true if Axis instances are equal
///
/// Instance of Axis to be compared
/// Boolean
public bool Equals(Axis input)
{
if (input == null)
{
return false;
}
return
(
Bounds == input.Bounds ||
Bounds != null &&
Bounds.SequenceEqual(input.Bounds)
) &&
(
Label == input.Label ||
Label != null && Label.Equals(input.Label)
) &&
(
Prefix == input.Prefix ||
Prefix != null && Prefix.Equals(input.Prefix)
) &&
(
Suffix == input.Suffix ||
Suffix != null && Suffix.Equals(input.Suffix)
) &&
(
Base == input.Base ||
Base.Equals(input.Base)
) &&
(
Scale == input.Scale ||
Scale.Equals(input.Scale)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
var hashCode = 41;
if (Bounds != null)
{
hashCode = hashCode * 59 + Bounds.GetHashCode();
}
if (Label != null)
{
hashCode = hashCode * 59 + Label.GetHashCode();
}
if (Prefix != null)
{
hashCode = hashCode * 59 + Prefix.GetHashCode();
}
if (Suffix != null)
{
hashCode = hashCode * 59 + Suffix.GetHashCode();
}
hashCode = hashCode * 59 + Base.GetHashCode();
hashCode = hashCode * 59 + Scale.GetHashCode();
return hashCode;
}
}
}
}