|
| 1 | +/* |
| 2 | + * Selling Partner API for Direct Fulfillment Orders |
| 3 | + * |
| 4 | + * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data. |
| 5 | + * |
| 6 | + * OpenAPI spec version: v1 |
| 7 | + * |
| 8 | + * Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 9 | + */ |
| 10 | + |
| 11 | +using System; |
| 12 | +using System.Text; |
| 13 | +using System.Collections.Generic; |
| 14 | +using System.Runtime.Serialization; |
| 15 | +using Newtonsoft.Json; |
| 16 | +using System.ComponentModel.DataAnnotations; |
| 17 | +using FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization; |
| 18 | + |
| 19 | +namespace FikaAmazonAPI.AmazonSpApiSDK.Models.VendorOrders |
| 20 | +{ |
| 21 | + /// <summary> |
| 22 | + /// The response schema for the getPurchasesOrder operation. |
| 23 | + /// </summary> |
| 24 | + [DataContract] |
| 25 | + public partial class GetPurchaseOrderResponse : IEquatable<GetPurchaseOrderResponse>, IValidatableObject |
| 26 | + { |
| 27 | + /// <summary> |
| 28 | + /// Initializes a new instance of the <see cref="GetOrderResponse" /> class. |
| 29 | + /// </summary> |
| 30 | + /// <param name="payload">The payload for the getOrder operation..</param> |
| 31 | + /// <param name="errors">errors.</param> |
| 32 | + public GetPurchaseOrderResponse(Order payload = default(Order), ErrorList errors = default(ErrorList)) |
| 33 | + { |
| 34 | + this.Payload = payload; |
| 35 | + this.Errors = errors; |
| 36 | + } |
| 37 | + public GetPurchaseOrderResponse() |
| 38 | + { |
| 39 | + this.Payload = default(Order); |
| 40 | + this.Errors = default(ErrorList); |
| 41 | + } |
| 42 | + /// <summary> |
| 43 | + /// The payload for the getOrder operation. |
| 44 | + /// </summary> |
| 45 | + /// <value>The payload for the getOrder operation.</value> |
| 46 | + [DataMember(Name = "payload", EmitDefaultValue = false)] |
| 47 | + public Order Payload { get; set; } |
| 48 | + |
| 49 | + /// <summary> |
| 50 | + /// Gets or Sets Errors |
| 51 | + /// </summary> |
| 52 | + [DataMember(Name = "errors", EmitDefaultValue = false)] |
| 53 | + public ErrorList Errors { get; set; } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// Returns the string presentation of the object |
| 57 | + /// </summary> |
| 58 | + /// <returns>String presentation of the object</returns> |
| 59 | + public override string ToString() |
| 60 | + { |
| 61 | + var sb = new StringBuilder(); |
| 62 | + sb.Append("class GetOrderResponse {\n"); |
| 63 | + sb.Append(" Payload: ").Append(Payload).Append("\n"); |
| 64 | + sb.Append(" Errors: ").Append(Errors).Append("\n"); |
| 65 | + sb.Append("}\n"); |
| 66 | + return sb.ToString(); |
| 67 | + } |
| 68 | + |
| 69 | + /// <summary> |
| 70 | + /// Returns the JSON string presentation of the object |
| 71 | + /// </summary> |
| 72 | + /// <returns>JSON string presentation of the object</returns> |
| 73 | + public virtual string ToJson() |
| 74 | + { |
| 75 | + return JsonConvert.SerializeObject(this, Formatting.Indented); |
| 76 | + } |
| 77 | + |
| 78 | + /// <summary> |
| 79 | + /// Returns true if objects are equal |
| 80 | + /// </summary> |
| 81 | + /// <param name="input">Object to be compared</param> |
| 82 | + /// <returns>Boolean</returns> |
| 83 | + public override bool Equals(object input) |
| 84 | + { |
| 85 | + return this.Equals(input as GetPurchaseOrderResponse); |
| 86 | + } |
| 87 | + |
| 88 | + /// <summary> |
| 89 | + /// Returns true if GetOrderResponse instances are equal |
| 90 | + /// </summary> |
| 91 | + /// <param name="input">Instance of GetOrderResponse to be compared</param> |
| 92 | + /// <returns>Boolean</returns> |
| 93 | + public bool Equals(GetPurchaseOrderResponse input) |
| 94 | + { |
| 95 | + if (input == null) |
| 96 | + return false; |
| 97 | + |
| 98 | + return |
| 99 | + ( |
| 100 | + this.Payload == input.Payload || |
| 101 | + (this.Payload != null && |
| 102 | + this.Payload.Equals(input.Payload)) |
| 103 | + ) && |
| 104 | + ( |
| 105 | + this.Errors == input.Errors || |
| 106 | + (this.Errors != null && |
| 107 | + this.Errors.Equals(input.Errors)) |
| 108 | + ); |
| 109 | + } |
| 110 | + |
| 111 | + /// <summary> |
| 112 | + /// Gets the hash code |
| 113 | + /// </summary> |
| 114 | + /// <returns>Hash code</returns> |
| 115 | + public override int GetHashCode() |
| 116 | + { |
| 117 | + unchecked // Overflow is fine, just wrap |
| 118 | + { |
| 119 | + int hashCode = 41; |
| 120 | + if (this.Payload != null) |
| 121 | + hashCode = hashCode * 59 + this.Payload.GetHashCode(); |
| 122 | + if (this.Errors != null) |
| 123 | + hashCode = hashCode * 59 + this.Errors.GetHashCode(); |
| 124 | + return hashCode; |
| 125 | + } |
| 126 | + } |
| 127 | + |
| 128 | + /// <summary> |
| 129 | + /// To validate all properties of the instance |
| 130 | + /// </summary> |
| 131 | + /// <param name="validationContext">Validation context</param> |
| 132 | + /// <returns>Validation Result</returns> |
| 133 | + IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 134 | + { |
| 135 | + yield break; |
| 136 | + } |
| 137 | + |
| 138 | + } |
| 139 | + |
| 140 | +} |
0 commit comments