From c66f0b4f8abe8f71556035e2de2ede491d8f4a66 Mon Sep 17 00:00:00 2001 From: Jay Scott Date: Fri, 24 Oct 2025 10:18:53 -0500 Subject: [PATCH] Adding in missing contributors --- .../CatalogItems/V20220401/ItemContributor.cs | 116 ++++++++++++++++++ .../V20220401/ItemContributorRole.cs | 113 +++++++++++++++++ .../V20220401/ItemContributors.cs | 80 ++++++++++++ .../V20220401/ItemSummaryByMarketplace.cs | 34 +++-- 4 files changed, 335 insertions(+), 8 deletions(-) create mode 100644 Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributor.cs create mode 100644 Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributorRole.cs create mode 100644 Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributors.cs diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributor.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributor.cs new file mode 100644 index 00000000..a08a798c --- /dev/null +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributor.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using FikaAmazonAPI.AmazonSpApiSDK.Models.Restrictions; +using System.Text; +using Newtonsoft.Json; + +namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems.V20220401 +{ + [DataContract] + public class ItemContributor : IEquatable, IValidatableObject + { + [JsonConstructorAttribute] + protected ItemContributor() { } + + /// + /// Initializes a new instance of the class. + /// + /// The Value of the contribotor + /// The role of the contributor + public ItemContributor(string value = default(string), ItemContributorRole itemContributorRole = default) + { + Role = new ItemContributorRole(); + } + + + /// + /// Contributor Role + /// + /// Contributor Role. + [DataMember(Name = "role", EmitDefaultValue = false)] + public ItemContributorRole Role { get; set; } + + /// + /// Contributor Value + /// + /// Contributor VAlue. + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ItemContributor {\n"); + sb.Append(" ItemContributorRole: ").Append(Role).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ItemContributor); + } + + /// + /// Returns true if ItemContributor instances are equal + /// + /// Instance of ItemContributor to be compared + /// Boolean + public bool Equals(ItemContributor input) + { + if (input == null) + return false; + + return + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + if (this.Role != null) + hashCode = hashCode * 59 + this.Role.GetHashCode(); + return hashCode; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } +} \ No newline at end of file diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributorRole.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributorRole.cs new file mode 100644 index 00000000..795d6e24 --- /dev/null +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributorRole.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems.V20220401 +{ + [DataContract] + public partial class ItemContributorRole : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public ItemContributorRole() + {} + + /// + /// Name of the role + /// + /// Name of the role + [DataMember(Name = "displayname", EmitDefaultValue = false)] + public string DisplayName { get; set; } + + /// + /// VAlue of the role + /// + /// Value of the role + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class public ItemContributorRole()\n {\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ItemImage); + } + + /// + /// Returns true if ItemContributorRole instances are equal + /// + /// Instance of ItemContributorRle to be compared + /// Boolean + public bool Equals(ItemContributorRole input) + { + if (input == null) + return false; + + return + ( + this.DisplayName == input.DisplayName || + (this.DisplayName != null && + this.DisplayName.Equals(input.DisplayName)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.DisplayName != null) + hashCode = hashCode * 59 + this.DisplayName.GetHashCode(); + if (this.Value != null) + hashCode = hashCode * 59 + this.Value.GetHashCode(); + + return hashCode; + } + } + + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } +} \ No newline at end of file diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributors.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributors.cs new file mode 100644 index 00000000..87ec0b4b --- /dev/null +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemContributors.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems.V20220401 +{ + [DataContract] + public class ItemContributors : List, IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + public ItemContributors() : base() + { + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ItemContributors {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ItemImages); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public bool Equals(ItemContributors input) + { + if (input == null) + return false; + + return base.Equals(input); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} \ No newline at end of file diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemSummaryByMarketplace.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemSummaryByMarketplace.cs index f204855d..2a597765 100644 --- a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemSummaryByMarketplace.cs +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/CatalogItems/V20220401/ItemSummaryByMarketplace.cs @@ -79,17 +79,19 @@ protected ItemSummaryByMarketplace() { } /// Classification type associated with the Amazon catalog item.. /// Name, or title, associated with an Amazon catalog item.. /// Name of the manufacturer associated with an Amazon catalog item.. - /// Model number associated with an Amazon catalog item.. - /// Quantity of an Amazon catalog item in one package.. - /// Part number associated with an Amazon catalog item.. - /// First date on which an Amazon catalog item is shippable to customers.. - /// Name of the size associated with an Amazon catalog item.. - /// Name of the style associated with an Amazon catalog item.. - /// Name of the website display group associated with an Amazon catalog item.. + /// Model number associated with an Amazon catalog item. + /// Quantity of an Amazon catalog item in one package. + /// Part number associated with an Amazon catalog item. + /// First date on which an Amazon catalog item is shippable to customers. + /// Name of the size associated with an Amazon catalog item. + /// Name of the style associated with an Amazon catalog item. + /// Name of the website display group associated with an Amazon catalog item. + /// Names of the contributors associated with an Amazon catalog item. public ItemSummaryByMarketplace(string marketplaceId = default, string brand = default, ItemBrowseClassification browseClassification = default, string color = default, ItemClassificationEnum? itemClassification = default, string itemName = default, string manufacturer = default, string modelNumber = default, int? packageQuantity = default, string partNumber = default, DateTime? releaseDate = default, - string size = default, string style = default, string websiteDisplayGroup = default, string websiteDisplayGroupName = default) + string size = default, string style = default, string websiteDisplayGroup = default, string websiteDisplayGroupName = default, + ItemContributors contributors = default) { // to ensure "marketplaceId" is required (not null) if (marketplaceId == null) @@ -114,6 +116,7 @@ public ItemSummaryByMarketplace(string marketplaceId = default, string brand = d this.Style = style; this.WebsiteDisplayGroup = websiteDisplayGroup; this.WebsiteDisplayGroupName = websiteDisplayGroupName; + this.Contributors = contributors; } /// @@ -215,6 +218,13 @@ public ItemSummaryByMarketplace(string marketplaceId = default, string brand = d [DataMember(Name = "websiteDisplayGroupName", EmitDefaultValue = false)] public string WebsiteDisplayGroupName { get; set; } + /// + /// Names of the contributors associated with an Amazon catalog item. + /// + /// Names of the contributors associated with the Amazon catalog item. + [DataMember(Name = "contributors", EmitDefaultValue = false)] + public ItemContributors Contributors { get; set; } + /// /// Returns the string presentation of the object /// @@ -236,6 +246,7 @@ public override string ToString() sb.Append(" Size: ").Append(Size).Append("\n"); sb.Append(" Style: ").Append(Style).Append("\n"); sb.Append(" WebsiteDisplayGroup: ").Append(WebsiteDisplayGroup).Append("\n"); + sb.Append(" Contributors:").Append(Contributors).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -334,6 +345,11 @@ public bool Equals(ItemSummaryByMarketplace input) this.WebsiteDisplayGroup == input.WebsiteDisplayGroup || (this.WebsiteDisplayGroup != null && this.WebsiteDisplayGroup.Equals(input.WebsiteDisplayGroup)) + ) && + ( + this.Contributors == input.Contributors || + (this.Contributors != null && + this.Contributors.Equals(input.Contributors)) ); } @@ -372,6 +388,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.Style.GetHashCode(); if (this.WebsiteDisplayGroup != null) hashCode = hashCode * 59 + this.WebsiteDisplayGroup.GetHashCode(); + if (this.Contributors != null) + hashCode = hashCode * 59 + this.Contributors.GetHashCode(); return hashCode; } }