|
| 1 | +/* |
| 2 | +* Configuration webhooks |
| 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.ConfigurationWebhooks |
| 28 | +{ |
| 29 | + /// <summary> |
| 30 | + /// Device |
| 31 | + /// </summary> |
| 32 | + [DataContract(Name = "Device")] |
| 33 | + public partial class Device : IEquatable<Device>, IValidatableObject |
| 34 | + { |
| 35 | + /// <summary> |
| 36 | + /// Initializes a new instance of the <see cref="Device" /> class. |
| 37 | + /// </summary> |
| 38 | + /// <param name="formFactor">The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc.</param> |
| 39 | + /// <param name="osName">The operating system of the device used for provisioning the network token..</param> |
| 40 | + public Device(string formFactor = default(string), string osName = default(string)) |
| 41 | + { |
| 42 | + this.FormFactor = formFactor; |
| 43 | + this.OsName = osName; |
| 44 | + } |
| 45 | + |
| 46 | + /// <summary> |
| 47 | + /// The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc |
| 48 | + /// </summary> |
| 49 | + /// <value>The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc</value> |
| 50 | + [DataMember(Name = "formFactor", EmitDefaultValue = false)] |
| 51 | + public string FormFactor { get; set; } |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// The operating system of the device used for provisioning the network token. |
| 55 | + /// </summary> |
| 56 | + /// <value>The operating system of the device used for provisioning the network token.</value> |
| 57 | + [DataMember(Name = "osName", EmitDefaultValue = false)] |
| 58 | + public string OsName { get; set; } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// Returns the string presentation of the object |
| 62 | + /// </summary> |
| 63 | + /// <returns>String presentation of the object</returns> |
| 64 | + public override string ToString() |
| 65 | + { |
| 66 | + StringBuilder sb = new StringBuilder(); |
| 67 | + sb.Append("class Device {\n"); |
| 68 | + sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); |
| 69 | + sb.Append(" OsName: ").Append(OsName).Append("\n"); |
| 70 | + sb.Append("}\n"); |
| 71 | + return sb.ToString(); |
| 72 | + } |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// Returns the JSON string presentation of the object |
| 76 | + /// </summary> |
| 77 | + /// <returns>JSON string presentation of the object</returns> |
| 78 | + public virtual string ToJson() |
| 79 | + { |
| 80 | + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 81 | + } |
| 82 | + |
| 83 | + /// <summary> |
| 84 | + /// Returns true if objects are equal |
| 85 | + /// </summary> |
| 86 | + /// <param name="input">Object to be compared</param> |
| 87 | + /// <returns>Boolean</returns> |
| 88 | + public override bool Equals(object input) |
| 89 | + { |
| 90 | + return this.Equals(input as Device); |
| 91 | + } |
| 92 | + |
| 93 | + /// <summary> |
| 94 | + /// Returns true if Device instances are equal |
| 95 | + /// </summary> |
| 96 | + /// <param name="input">Instance of Device to be compared</param> |
| 97 | + /// <returns>Boolean</returns> |
| 98 | + public bool Equals(Device input) |
| 99 | + { |
| 100 | + if (input == null) |
| 101 | + { |
| 102 | + return false; |
| 103 | + } |
| 104 | + return |
| 105 | + ( |
| 106 | + this.FormFactor == input.FormFactor || |
| 107 | + (this.FormFactor != null && |
| 108 | + this.FormFactor.Equals(input.FormFactor)) |
| 109 | + ) && |
| 110 | + ( |
| 111 | + this.OsName == input.OsName || |
| 112 | + (this.OsName != null && |
| 113 | + this.OsName.Equals(input.OsName)) |
| 114 | + ); |
| 115 | + } |
| 116 | + |
| 117 | + /// <summary> |
| 118 | + /// Gets the hash code |
| 119 | + /// </summary> |
| 120 | + /// <returns>Hash code</returns> |
| 121 | + public override int GetHashCode() |
| 122 | + { |
| 123 | + unchecked // Overflow is fine, just wrap |
| 124 | + { |
| 125 | + int hashCode = 41; |
| 126 | + if (this.FormFactor != null) |
| 127 | + { |
| 128 | + hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); |
| 129 | + } |
| 130 | + if (this.OsName != null) |
| 131 | + { |
| 132 | + hashCode = (hashCode * 59) + this.OsName.GetHashCode(); |
| 133 | + } |
| 134 | + return hashCode; |
| 135 | + } |
| 136 | + } |
| 137 | + /// <summary> |
| 138 | + /// To validate all properties of the instance |
| 139 | + /// </summary> |
| 140 | + /// <param name="validationContext">Validation context</param> |
| 141 | + /// <returns>Validation Result</returns> |
| 142 | + public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext) |
| 143 | + { |
| 144 | + yield break; |
| 145 | + } |
| 146 | + } |
| 147 | + |
| 148 | +} |
0 commit comments