|
| 1 | +/* |
| 2 | + * Selling Partner API for Catalog Items |
| 3 | + * |
| 4 | + * The Selling Partner API for Catalog Items provides programmatic access to information about items in the Amazon catalog. For more information, refer to the [Catalog Items API Use Case Guide](doc:catalog-items-api-v2022-04-01-use-case-guide). |
| 5 | + * |
| 6 | + * OpenAPI spec version: 2022-04-01 |
| 7 | + * |
| 8 | + * Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 9 | + */ |
| 10 | + |
| 11 | +using Newtonsoft.Json; |
| 12 | +using System; |
| 13 | +using System.Collections.Generic; |
| 14 | +using System.ComponentModel.DataAnnotations; |
| 15 | +using System.IO; |
| 16 | +using System.Runtime.Serialization; |
| 17 | +using System.Text; |
| 18 | + |
| 19 | +namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems.V20220401 |
| 20 | +{ |
| 21 | + /// <summary> |
| 22 | + /// Classification (browse node) associated with the item in the Amazon catalog for the indicated Amazon marketplace. |
| 23 | + /// </summary> |
| 24 | + [DataContract] |
| 25 | + public partial class ItemBrowseClassificationsByMarketplace : IEquatable<ItemBrowseClassificationsByMarketplace>, IValidatableObject |
| 26 | + { |
| 27 | + /// <summary> |
| 28 | + /// Initializes a new instance of the <see cref="ItemBrowseClassificationsByMarketplace" /> class. |
| 29 | + /// </summary> |
| 30 | + [JsonConstructor] |
| 31 | + protected ItemBrowseClassificationsByMarketplace() { } |
| 32 | + /// <summary> |
| 33 | + /// Initializes a new instance of the <see cref="ItemBrowseClassificationsByMarketplace" /> class. |
| 34 | + /// </summary> |
| 35 | + /// <param name="marketplaceId">Amazon marketplace identifier. (required).</param> |
| 36 | + /// <param name="classifications">Classification (browse node) Array of an Amazon catalog item.</param> |
| 37 | + public ItemBrowseClassificationsByMarketplace(string marketplaceId = default(string), List<ItemBrowseClassification> classifications = default(List<ItemBrowseClassification>)) |
| 38 | + { |
| 39 | + // to ensure "marketplaceId" is required (not null) |
| 40 | + if (marketplaceId == null) |
| 41 | + { |
| 42 | + throw new InvalidDataException("marketplaceId is a required property for ItemBrowseClassificationsByMarketplace and cannot be null"); |
| 43 | + } |
| 44 | + else |
| 45 | + { |
| 46 | + MarketplaceId = marketplaceId; |
| 47 | + } |
| 48 | + Classifications = classifications; |
| 49 | + } |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Amazon marketplace identifier. |
| 53 | + /// </summary> |
| 54 | + /// <value>Amazon marketplace identifier.</value> |
| 55 | + [DataMember(Name = "marketplaceId", EmitDefaultValue = false)] |
| 56 | + public string MarketplaceId { get; set; } |
| 57 | + |
| 58 | + /// <summary> |
| 59 | + /// Classifications of an Amazon catalog item. |
| 60 | + /// </summary> |
| 61 | + /// <value>Classifications of an Amazon catalog item.</value> |
| 62 | + [DataMember(Name = "classifications", EmitDefaultValue = false)] |
| 63 | + public List<ItemBrowseClassification> Classifications { 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 | + var sb = new StringBuilder(); |
| 72 | + sb.Append("class ItemDimensionsByMarketplace {\n"); |
| 73 | + sb.Append(" MarketplaceId: ").Append(this.MarketplaceId).Append("\n"); |
| 74 | + sb.Append(" Classifications: ").Append(this.Classifications).Append("\n"); |
| 75 | + sb.Append("}\n"); |
| 76 | + return sb.ToString(); |
| 77 | + } |
| 78 | + |
| 79 | + /// <summary> |
| 80 | + /// Returns the JSON string presentation of the object |
| 81 | + /// </summary> |
| 82 | + /// <returns>JSON string presentation of the object</returns> |
| 83 | + public virtual string ToJson() |
| 84 | + { |
| 85 | + return JsonConvert.SerializeObject(this, Formatting.Indented); |
| 86 | + } |
| 87 | + |
| 88 | + /// <summary> |
| 89 | + /// Returns true if objects are equal |
| 90 | + /// </summary> |
| 91 | + /// <param name="input">Object to be compared</param> |
| 92 | + /// <returns>Boolean</returns> |
| 93 | + public override bool Equals(object input) |
| 94 | + { |
| 95 | + return Equals(input as ItemBrowseClassificationsByMarketplace); |
| 96 | + } |
| 97 | + |
| 98 | + /// <summary> |
| 99 | + /// Returns true if ItemDimensionsByMarketplace instances are equal |
| 100 | + /// </summary> |
| 101 | + /// <param name="input">Instance of ItemDimensionsByMarketplace to be compared</param> |
| 102 | + /// <returns>Boolean</returns> |
| 103 | + public bool Equals(ItemBrowseClassificationsByMarketplace input) |
| 104 | + { |
| 105 | + if (input == null) |
| 106 | + return false; |
| 107 | + |
| 108 | + return |
| 109 | + ( |
| 110 | + this.MarketplaceId == input.MarketplaceId || |
| 111 | + this.MarketplaceId != null && |
| 112 | + this.MarketplaceId.Equals(input.MarketplaceId) |
| 113 | + ) && |
| 114 | + ( |
| 115 | + this.Classifications == input.Classifications || |
| 116 | + this.Classifications != null && |
| 117 | + this.Classifications.Equals(input.Classifications) |
| 118 | + ); |
| 119 | + } |
| 120 | + |
| 121 | + /// <summary> |
| 122 | + /// Gets the hash code |
| 123 | + /// </summary> |
| 124 | + /// <returns>Hash code</returns> |
| 125 | + public override int GetHashCode() |
| 126 | + { |
| 127 | + unchecked // Overflow is fine, just wrap |
| 128 | + { |
| 129 | + int hashCode = 41; |
| 130 | + if (this.MarketplaceId != null) |
| 131 | + hashCode = hashCode * 59 + this.MarketplaceId.GetHashCode(); |
| 132 | + if (this.Classifications != null) |
| 133 | + hashCode = hashCode * 59 + this.Classifications.GetHashCode(); |
| 134 | + return hashCode; |
| 135 | + } |
| 136 | + } |
| 137 | + |
| 138 | + /// <summary> |
| 139 | + /// To validate all properties of the instance |
| 140 | + /// </summary> |
| 141 | + /// <param name="validationContext">Validation context</param> |
| 142 | + /// <returns>Validation Result</returns> |
| 143 | + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 144 | + { |
| 145 | + yield break; |
| 146 | + } |
| 147 | + } |
| 148 | +} |
0 commit comments