/* * 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 { /// /// MarkdownViewProperties /// [DataContract] public partial class MarkdownViewProperties : ViewProperties, IEquatable { /// /// Defines Type /// [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { /// /// Enum Markdown for value: markdown /// [EnumMember(Value = "markdown")] Markdown = 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 MarkdownViewProperties() { } /// /// Initializes a new instance of the class. /// /// type (required) (default to TypeEnum.Markdown). /// shape (required) (default to ShapeEnum.ChronografV2). /// note (required). public MarkdownViewProperties(TypeEnum type = TypeEnum.Markdown, ShapeEnum shape = ShapeEnum.ChronografV2, string note = default) : base() { // to ensure "type" is required (not null) Type = type; // 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 MarkdownViewProperties and cannot be null"); } Note = note; } /// /// Gets or Sets Note /// [DataMember(Name = "note", EmitDefaultValue = false)] public string Note { 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 MarkdownViewProperties {\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(" Note: ").Append(Note).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 MarkdownViewProperties); } /// /// Returns true if MarkdownViewProperties instances are equal /// /// Instance of MarkdownViewProperties to be compared /// Boolean public bool Equals(MarkdownViewProperties 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) && ( Note == input.Note || Note != null && Note.Equals(input.Note) ); } /// /// 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 (Note != null) { hashCode = hashCode * 59 + Note.GetHashCode(); } return hashCode; } } } }