|
| 1 | +/* |
| 2 | +* Configuration API |
| 3 | +* |
| 4 | +* |
| 5 | +* The version of the OpenAPI document: 2 |
| 6 | +* |
| 7 | +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | +* https://openapi-generator.tech |
| 9 | +* Do not edit the class manually. |
| 10 | +*/ |
| 11 | + |
| 12 | +using System; |
| 13 | +using System.Collections; |
| 14 | +using System.Collections.Generic; |
| 15 | +using System.Collections.ObjectModel; |
| 16 | +using System.Linq; |
| 17 | +using System.IO; |
| 18 | +using System.Runtime.Serialization; |
| 19 | +using System.Text; |
| 20 | +using System.Text.RegularExpressions; |
| 21 | +using Newtonsoft.Json; |
| 22 | +using Newtonsoft.Json.Converters; |
| 23 | +using Newtonsoft.Json.Linq; |
| 24 | +using System.ComponentModel.DataAnnotations; |
| 25 | +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; |
| 26 | + |
| 27 | +namespace Adyen.Model.BalancePlatform |
| 28 | +{ |
| 29 | + /// <summary> |
| 30 | + /// PriorityRestriction |
| 31 | + /// </summary> |
| 32 | + [DataContract(Name = "PriorityRestriction")] |
| 33 | + public partial class PriorityRestriction : IEquatable<PriorityRestriction>, IValidatableObject |
| 34 | + { |
| 35 | + /// <summary> |
| 36 | + /// Defines Value |
| 37 | + /// </summary> |
| 38 | + [JsonConverter(typeof(StringEnumConverter))] |
| 39 | + public enum ValueEnum |
| 40 | + { |
| 41 | + /// <summary> |
| 42 | + /// Enum CrossBorder for value: crossBorder |
| 43 | + /// </summary> |
| 44 | + [EnumMember(Value = "crossBorder")] |
| 45 | + CrossBorder = 1, |
| 46 | + |
| 47 | + /// <summary> |
| 48 | + /// Enum Fast for value: fast |
| 49 | + /// </summary> |
| 50 | + [EnumMember(Value = "fast")] |
| 51 | + Fast = 2, |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// Enum Instant for value: instant |
| 55 | + /// </summary> |
| 56 | + [EnumMember(Value = "instant")] |
| 57 | + Instant = 3, |
| 58 | + |
| 59 | + /// <summary> |
| 60 | + /// Enum IntraBank for value: intraBank |
| 61 | + /// </summary> |
| 62 | + [EnumMember(Value = "intraBank")] |
| 63 | + IntraBank = 4, |
| 64 | + |
| 65 | + /// <summary> |
| 66 | + /// Enum Regular for value: regular |
| 67 | + /// </summary> |
| 68 | + [EnumMember(Value = "regular")] |
| 69 | + Regular = 5 |
| 70 | + |
| 71 | + } |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + /// <summary> |
| 76 | + /// Gets or Sets Value |
| 77 | + /// </summary> |
| 78 | + [DataMember(Name = "value", EmitDefaultValue = false)] |
| 79 | + public List<ValueEnum> Value { get; set; } |
| 80 | + /// <summary> |
| 81 | + /// Initializes a new instance of the <see cref="PriorityRestriction" /> class. |
| 82 | + /// </summary> |
| 83 | + [JsonConstructorAttribute] |
| 84 | + protected PriorityRestriction() { } |
| 85 | + /// <summary> |
| 86 | + /// Initializes a new instance of the <see cref="PriorityRestriction" /> class. |
| 87 | + /// </summary> |
| 88 | + /// <param name="operation">Defines how the condition must be evaluated. (required).</param> |
| 89 | + /// <param name="value">value.</param> |
| 90 | + public PriorityRestriction(string operation = default(string), List<ValueEnum> value = default(List<ValueEnum>)) |
| 91 | + { |
| 92 | + this.Operation = operation; |
| 93 | + this.Value = value; |
| 94 | + } |
| 95 | + |
| 96 | + /// <summary> |
| 97 | + /// Defines how the condition must be evaluated. |
| 98 | + /// </summary> |
| 99 | + /// <value>Defines how the condition must be evaluated.</value> |
| 100 | + [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] |
| 101 | + public string Operation { get; set; } |
| 102 | + |
| 103 | + /// <summary> |
| 104 | + /// Returns the string presentation of the object |
| 105 | + /// </summary> |
| 106 | + /// <returns>String presentation of the object</returns> |
| 107 | + public override string ToString() |
| 108 | + { |
| 109 | + StringBuilder sb = new StringBuilder(); |
| 110 | + sb.Append("class PriorityRestriction {\n"); |
| 111 | + sb.Append(" Operation: ").Append(Operation).Append("\n"); |
| 112 | + sb.Append(" Value: ").Append(Value).Append("\n"); |
| 113 | + sb.Append("}\n"); |
| 114 | + return sb.ToString(); |
| 115 | + } |
| 116 | + |
| 117 | + /// <summary> |
| 118 | + /// Returns the JSON string presentation of the object |
| 119 | + /// </summary> |
| 120 | + /// <returns>JSON string presentation of the object</returns> |
| 121 | + public virtual string ToJson() |
| 122 | + { |
| 123 | + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 124 | + } |
| 125 | + |
| 126 | + /// <summary> |
| 127 | + /// Returns true if objects are equal |
| 128 | + /// </summary> |
| 129 | + /// <param name="input">Object to be compared</param> |
| 130 | + /// <returns>Boolean</returns> |
| 131 | + public override bool Equals(object input) |
| 132 | + { |
| 133 | + return this.Equals(input as PriorityRestriction); |
| 134 | + } |
| 135 | + |
| 136 | + /// <summary> |
| 137 | + /// Returns true if PriorityRestriction instances are equal |
| 138 | + /// </summary> |
| 139 | + /// <param name="input">Instance of PriorityRestriction to be compared</param> |
| 140 | + /// <returns>Boolean</returns> |
| 141 | + public bool Equals(PriorityRestriction input) |
| 142 | + { |
| 143 | + if (input == null) |
| 144 | + { |
| 145 | + return false; |
| 146 | + } |
| 147 | + return |
| 148 | + ( |
| 149 | + this.Operation == input.Operation || |
| 150 | + (this.Operation != null && |
| 151 | + this.Operation.Equals(input.Operation)) |
| 152 | + ) && |
| 153 | + ( |
| 154 | + this.Value == input.Value || |
| 155 | + this.Value.SequenceEqual(input.Value) |
| 156 | + ); |
| 157 | + } |
| 158 | + |
| 159 | + /// <summary> |
| 160 | + /// Gets the hash code |
| 161 | + /// </summary> |
| 162 | + /// <returns>Hash code</returns> |
| 163 | + public override int GetHashCode() |
| 164 | + { |
| 165 | + unchecked // Overflow is fine, just wrap |
| 166 | + { |
| 167 | + int hashCode = 41; |
| 168 | + if (this.Operation != null) |
| 169 | + { |
| 170 | + hashCode = (hashCode * 59) + this.Operation.GetHashCode(); |
| 171 | + } |
| 172 | + hashCode = (hashCode * 59) + this.Value.GetHashCode(); |
| 173 | + return hashCode; |
| 174 | + } |
| 175 | + } |
| 176 | + /// <summary> |
| 177 | + /// To validate all properties of the instance |
| 178 | + /// </summary> |
| 179 | + /// <param name="validationContext">Validation context</param> |
| 180 | + /// <returns>Validation Result</returns> |
| 181 | + public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext) |
| 182 | + { |
| 183 | + yield break; |
| 184 | + } |
| 185 | + } |
| 186 | + |
| 187 | +} |
0 commit comments