|
| 1 | +/* |
| 2 | + * OpenAPI Petstore |
| 3 | + * |
| 4 | + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ |
| 5 | + * |
| 6 | + * The version of the OpenAPI document: 1.0.0 |
| 7 | + * Generated by: https://github.com/openapitools/openapi-generator.git |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +using System; |
| 12 | +using System.Collections; |
| 13 | +using System.Collections.Generic; |
| 14 | +using System.Collections.ObjectModel; |
| 15 | +using System.Linq; |
| 16 | +using System.IO; |
| 17 | +using System.Runtime.Serialization; |
| 18 | +using System.Text; |
| 19 | +using System.Text.RegularExpressions; |
| 20 | +using Newtonsoft.Json; |
| 21 | +using Newtonsoft.Json.Converters; |
| 22 | +using Newtonsoft.Json.Linq; |
| 23 | +using System.ComponentModel.DataAnnotations; |
| 24 | +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; |
| 25 | +using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils; |
| 26 | + |
| 27 | +namespace Org.OpenAPITools.Model |
| 28 | +{ |
| 29 | + /// <summary> |
| 30 | + /// SpecialModelName |
| 31 | + /// </summary> |
| 32 | + [DataContract(Name = "_special_model.name_")] |
| 33 | + public partial class SpecialModelName : IEquatable<SpecialModelName>, IValidatableObject |
| 34 | + { |
| 35 | + /// <summary> |
| 36 | + /// Initializes a new instance of the <see cref="SpecialModelName" /> class. |
| 37 | + /// </summary> |
| 38 | + /// <param name="specialPropertyName">specialPropertyName.</param> |
| 39 | + /// <param name="varSpecialModelName">varSpecialModelName.</param> |
| 40 | + public SpecialModelName(long specialPropertyName = default, string varSpecialModelName = default) |
| 41 | + { |
| 42 | + this.SpecialPropertyName = specialPropertyName; |
| 43 | + this.VarSpecialModelName = varSpecialModelName; |
| 44 | + this.AdditionalProperties = new Dictionary<string, object>(); |
| 45 | + } |
| 46 | + |
| 47 | + /// <summary> |
| 48 | + /// Gets or Sets SpecialPropertyName |
| 49 | + /// </summary> |
| 50 | + [DataMember(Name = "$special[property.name]", EmitDefaultValue = false)] |
| 51 | + public long SpecialPropertyName { get; set; } |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// Gets or Sets VarSpecialModelName |
| 55 | + /// </summary> |
| 56 | + [DataMember(Name = "_special_model.name_", EmitDefaultValue = false)] |
| 57 | + public string VarSpecialModelName { get; set; } |
| 58 | + |
| 59 | + /// <summary> |
| 60 | + /// Gets or Sets additional properties |
| 61 | + /// </summary> |
| 62 | + [JsonExtensionData] |
| 63 | + public IDictionary<string, object> AdditionalProperties { get; set; } |
| 64 | + |
| 65 | + /// <summary> |
| 66 | + /// Returns the string presentation of the object |
| 67 | + /// </summary> |
| 68 | + /// <returns>String presentation of the object</returns> |
| 69 | + public override string ToString() |
| 70 | + { |
| 71 | + StringBuilder sb = new StringBuilder(); |
| 72 | + sb.Append("class SpecialModelName {\n"); |
| 73 | + sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); |
| 74 | + sb.Append(" VarSpecialModelName: ").Append(VarSpecialModelName).Append("\n"); |
| 75 | + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); |
| 76 | + sb.Append("}\n"); |
| 77 | + return sb.ToString(); |
| 78 | + } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Returns the JSON string presentation of the object |
| 82 | + /// </summary> |
| 83 | + /// <returns>JSON string presentation of the object</returns> |
| 84 | + public virtual string ToJson() |
| 85 | + { |
| 86 | + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 87 | + } |
| 88 | + |
| 89 | + /// <summary> |
| 90 | + /// Returns true if objects are equal |
| 91 | + /// </summary> |
| 92 | + /// <param name="input">Object to be compared</param> |
| 93 | + /// <returns>Boolean</returns> |
| 94 | + public override bool Equals(object input) |
| 95 | + { |
| 96 | + return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; |
| 97 | + } |
| 98 | + |
| 99 | + /// <summary> |
| 100 | + /// Returns true if SpecialModelName instances are equal |
| 101 | + /// </summary> |
| 102 | + /// <param name="input">Instance of SpecialModelName to be compared</param> |
| 103 | + /// <returns>Boolean</returns> |
| 104 | + public bool Equals(SpecialModelName input) |
| 105 | + { |
| 106 | + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; |
| 107 | + } |
| 108 | + |
| 109 | + /// <summary> |
| 110 | + /// Gets the hash code |
| 111 | + /// </summary> |
| 112 | + /// <returns>Hash code</returns> |
| 113 | + public override int GetHashCode() |
| 114 | + { |
| 115 | + unchecked // Overflow is fine, just wrap |
| 116 | + { |
| 117 | + int hashCode = 41; |
| 118 | + hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); |
| 119 | + if (this.VarSpecialModelName != null) |
| 120 | + { |
| 121 | + hashCode = (hashCode * 59) + this.VarSpecialModelName.GetHashCode(); |
| 122 | + } |
| 123 | + if (this.AdditionalProperties != null) |
| 124 | + { |
| 125 | + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); |
| 126 | + } |
| 127 | + return hashCode; |
| 128 | + } |
| 129 | + } |
| 130 | + |
| 131 | + /// <summary> |
| 132 | + /// To validate all properties of the instance |
| 133 | + /// </summary> |
| 134 | + /// <param name="validationContext">Validation context</param> |
| 135 | + /// <returns>Validation Result</returns> |
| 136 | + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 137 | + { |
| 138 | + yield break; |
| 139 | + } |
| 140 | + } |
| 141 | + |
| 142 | +} |
0 commit comments