|
| 1 | +/* |
| 2 | + * My title |
| 3 | + * |
| 4 | + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 5 | + * |
| 6 | + * OpenAPI spec version: 1 |
| 7 | + * |
| 8 | + * Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 9 | + */ |
| 10 | + |
| 11 | +using System; |
| 12 | +using System.Linq; |
| 13 | +using System.IO; |
| 14 | +using System.Text; |
| 15 | +using System.Text.RegularExpressions; |
| 16 | +using System.Collections; |
| 17 | +using System.Collections.Generic; |
| 18 | +using System.Collections.ObjectModel; |
| 19 | +using System.Runtime.Serialization; |
| 20 | +using Newtonsoft.Json; |
| 21 | +using Newtonsoft.Json.Converters; |
| 22 | +using System.ComponentModel.DataAnnotations; |
| 23 | +using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter; |
| 24 | + |
| 25 | +namespace IO.Swagger.Model |
| 26 | +{ |
| 27 | + /// <summary> |
| 28 | + /// Invalid use of required on $ref enum, per Swagger 2.0 spec: Any members other than '$ref' in a JSON Reference object SHALL be ignored. See My_Class_With_Required_Inline_Enum for appropriate usage. |
| 29 | + /// </summary> |
| 30 | + [DataContract] |
| 31 | + public partial class MyClassWithInvalidRequiredEnumUsageOnRef : IEquatable<MyClassWithInvalidRequiredEnumUsageOnRef>, IValidatableObject |
| 32 | + { |
| 33 | + /// <summary> |
| 34 | + /// Gets or Sets Days |
| 35 | + /// </summary> |
| 36 | + [DataMember(Name="days", EmitDefaultValue=false)] |
| 37 | + public WeekDays? Days { get; set; } |
| 38 | + /// <summary> |
| 39 | + /// Initializes a new instance of the <see cref="MyClassWithInvalidRequiredEnumUsageOnRef" /> class. |
| 40 | + /// </summary> |
| 41 | + /// <param name="First">First.</param> |
| 42 | + /// <param name="Days">Days.</param> |
| 43 | + public MyClassWithInvalidRequiredEnumUsageOnRef(bool? First = default(bool?), WeekDays? Days = default(WeekDays?)) |
| 44 | + { |
| 45 | + this.First = First; |
| 46 | + this.Days = Days; |
| 47 | + } |
| 48 | + |
| 49 | + /// <summary> |
| 50 | + /// Gets or Sets First |
| 51 | + /// </summary> |
| 52 | + [DataMember(Name="first", EmitDefaultValue=false)] |
| 53 | + public bool? First { get; set; } |
| 54 | + |
| 55 | + |
| 56 | + /// <summary> |
| 57 | + /// Returns the string presentation of the object |
| 58 | + /// </summary> |
| 59 | + /// <returns>String presentation of the object</returns> |
| 60 | + public override string ToString() |
| 61 | + { |
| 62 | + var sb = new StringBuilder(); |
| 63 | + sb.Append("class MyClassWithInvalidRequiredEnumUsageOnRef {\n"); |
| 64 | + sb.Append(" First: ").Append(First).Append("\n"); |
| 65 | + sb.Append(" Days: ").Append(Days).Append("\n"); |
| 66 | + sb.Append("}\n"); |
| 67 | + return sb.ToString(); |
| 68 | + } |
| 69 | + |
| 70 | + /// <summary> |
| 71 | + /// Returns the JSON string presentation of the object |
| 72 | + /// </summary> |
| 73 | + /// <returns>JSON string presentation of the object</returns> |
| 74 | + public string ToJson() |
| 75 | + { |
| 76 | + return JsonConvert.SerializeObject(this, Formatting.Indented); |
| 77 | + } |
| 78 | + |
| 79 | + /// <summary> |
| 80 | + /// Returns true if objects are equal |
| 81 | + /// </summary> |
| 82 | + /// <param name="input">Object to be compared</param> |
| 83 | + /// <returns>Boolean</returns> |
| 84 | + public override bool Equals(object input) |
| 85 | + { |
| 86 | + return this.Equals(input as MyClassWithInvalidRequiredEnumUsageOnRef); |
| 87 | + } |
| 88 | + |
| 89 | + /// <summary> |
| 90 | + /// Returns true if MyClassWithInvalidRequiredEnumUsageOnRef instances are equal |
| 91 | + /// </summary> |
| 92 | + /// <param name="input">Instance of MyClassWithInvalidRequiredEnumUsageOnRef to be compared</param> |
| 93 | + /// <returns>Boolean</returns> |
| 94 | + public bool Equals(MyClassWithInvalidRequiredEnumUsageOnRef input) |
| 95 | + { |
| 96 | + if (input == null) |
| 97 | + return false; |
| 98 | + |
| 99 | + return |
| 100 | + ( |
| 101 | + this.First == input.First || |
| 102 | + (this.First != null && |
| 103 | + this.First.Equals(input.First)) |
| 104 | + ) && |
| 105 | + ( |
| 106 | + this.Days == input.Days || |
| 107 | + (this.Days != null && |
| 108 | + this.Days.Equals(input.Days)) |
| 109 | + ); |
| 110 | + } |
| 111 | + |
| 112 | + /// <summary> |
| 113 | + /// Gets the hash code |
| 114 | + /// </summary> |
| 115 | + /// <returns>Hash code</returns> |
| 116 | + public override int GetHashCode() |
| 117 | + { |
| 118 | + unchecked // Overflow is fine, just wrap |
| 119 | + { |
| 120 | + int hashCode = 41; |
| 121 | + if (this.First != null) |
| 122 | + hashCode = hashCode * 59 + this.First.GetHashCode(); |
| 123 | + if (this.Days != null) |
| 124 | + hashCode = hashCode * 59 + this.Days.GetHashCode(); |
| 125 | + return hashCode; |
| 126 | + } |
| 127 | + } |
| 128 | + |
| 129 | + /// <summary> |
| 130 | + /// To validate all properties of the instance |
| 131 | + /// </summary> |
| 132 | + /// <param name="validationContext">Validation context</param> |
| 133 | + /// <returns>Validation Result</returns> |
| 134 | + IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 135 | + { |
| 136 | + yield break; |
| 137 | + } |
| 138 | + } |
| 139 | + |
| 140 | +} |
0 commit comments