/* * 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 { /// /// The viewport for a View's visualizations /// [DataContract] public partial class Axes : IEquatable { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Axes() { } /// /// Initializes a new instance of the class. /// /// x (required). /// y (required). public Axes(Axis x = default, Axis y = default) { // to ensure "x" is required (not null) if (x == null) { throw new InvalidDataException("x is a required property for Axes and cannot be null"); } X = x; // to ensure "y" is required (not null) if (y == null) { throw new InvalidDataException("y is a required property for Axes and cannot be null"); } Y = y; } /// /// Gets or Sets X /// [DataMember(Name = "x", EmitDefaultValue = false)] public Axis X { get; set; } /// /// Gets or Sets Y /// [DataMember(Name = "y", EmitDefaultValue = false)] public Axis Y { 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 Axes {\n"); sb.Append(" X: ").Append(X).Append("\n"); sb.Append(" Y: ").Append(Y).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 Axes); } /// /// Returns true if Axes instances are equal /// /// Instance of Axes to be compared /// Boolean public bool Equals(Axes input) { if (input == null) { return false; } return X != null && X.Equals(input.X) && Y != null && Y.Equals(input.Y); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (Y != null) { hashCode = hashCode * 59 + Y.GetHashCode(); } return hashCode; } } } }