Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<ItemContributor>, IValidatableObject
{
[JsonConstructorAttribute]
protected ItemContributor() { }

/// <summary>
/// Initializes a new instance of the <see cref="ItemContributor" /> class.
/// </summary>
/// <param name="value">The Value of the contribotor</param>
/// <param name="itemContributorRole">The role of the contributor</param>
public ItemContributor(string value = default(string), ItemContributorRole itemContributorRole = default)
{
Role = new ItemContributorRole();
}


/// <summary>
/// Contributor Role
/// </summary>
/// <value>Contributor Role.</value>
[DataMember(Name = "role", EmitDefaultValue = false)]
public ItemContributorRole Role { get; set; }

/// <summary>
/// Contributor Value
/// </summary>
/// <value>Contributor VAlue.</value>
[DataMember(Name = "value", EmitDefaultValue = false)]
public string Value { get; set; }


/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as ItemContributor);
}

/// <summary>
/// Returns true if ItemContributor instances are equal
/// </summary>
/// <param name="input">Instance of ItemContributor to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ItemContributor input)
{
if (input == null)
return false;

return
(
this.Value == input.Value ||
(this.Value != null &&
this.Value.Equals(input.Value))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
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<ValidationResult> Validate(ValidationContext validationContext)
{
yield break;
}
}
}
Original file line number Diff line number Diff line change
@@ -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<ItemContributorRole>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ItemContributorRole" /> class.
/// </summary>
[JsonConstructorAttribute]
public ItemContributorRole()
{}

/// <summary>
/// Name of the role
/// </summary>
/// <value>Name of the role</value>
[DataMember(Name = "displayname", EmitDefaultValue = false)]
public string DisplayName { get; set; }

/// <summary>
/// VAlue of the role
/// </summary>
/// <value>Value of the role</value>
[DataMember(Name = "value", EmitDefaultValue = false)]
public string Value { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as ItemImage);
}

/// <summary>
/// Returns true if ItemContributorRole instances are equal
/// </summary>
/// <param name="input">Instance of ItemContributorRle to be compared</param>
/// <returns>Boolean</returns>
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))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
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<ValidationResult> Validate(ValidationContext validationContext)
{
yield break;
}
}
}
Original file line number Diff line number Diff line change
@@ -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<ItemContributor>, IEquatable<ItemContributors>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ItemImages" /> class.
/// </summary>
[JsonConstructorAttribute]
public ItemContributors() : base()
{
}

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
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();
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as ItemImages);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ItemContributors input)
{
if (input == null)
return false;

return base.Equals(input);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = base.GetHashCode();
return hashCode;
}
}

/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,19 @@ protected ItemSummaryByMarketplace() { }
/// <param name="itemClassification">Classification type associated with the Amazon catalog item..</param>
/// <param name="itemName">Name, or title, associated with an Amazon catalog item..</param>
/// <param name="manufacturer">Name of the manufacturer associated with an Amazon catalog item..</param>
/// <param name="modelNumber">Model number associated with an Amazon catalog item..</param>
/// <param name="packageQuantity">Quantity of an Amazon catalog item in one package..</param>
/// <param name="partNumber">Part number associated with an Amazon catalog item..</param>
/// <param name="releaseDate">First date on which an Amazon catalog item is shippable to customers..</param>
/// <param name="size">Name of the size associated with an Amazon catalog item..</param>
/// <param name="style">Name of the style associated with an Amazon catalog item..</param>
/// <param name="websiteDisplayGroup">Name of the website display group associated with an Amazon catalog item..</param>
/// <param name="modelNumber">Model number associated with an Amazon catalog item.</param>
/// <param name="packageQuantity">Quantity of an Amazon catalog item in one package.</param>
/// <param name="partNumber">Part number associated with an Amazon catalog item.</param>
/// <param name="releaseDate">First date on which an Amazon catalog item is shippable to customers.</param>
/// <param name="size">Name of the size associated with an Amazon catalog item.</param>
/// <param name="style">Name of the style associated with an Amazon catalog item.</param>
/// <param name="websiteDisplayGroup">Name of the website display group associated with an Amazon catalog item.</param>
/// <param name="contributors">Names of the contributors associated with an Amazon catalog item.</param>
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)
Expand All @@ -114,6 +116,7 @@ public ItemSummaryByMarketplace(string marketplaceId = default, string brand = d
this.Style = style;
this.WebsiteDisplayGroup = websiteDisplayGroup;
this.WebsiteDisplayGroupName = websiteDisplayGroupName;
this.Contributors = contributors;
}

/// <summary>
Expand Down Expand Up @@ -215,6 +218,13 @@ public ItemSummaryByMarketplace(string marketplaceId = default, string brand = d
[DataMember(Name = "websiteDisplayGroupName", EmitDefaultValue = false)]
public string WebsiteDisplayGroupName { get; set; }

/// <summary>
/// Names of the contributors associated with an Amazon catalog item.
/// </summary>
/// <value>Names of the contributors associated with the Amazon catalog item.</value>
[DataMember(Name = "contributors", EmitDefaultValue = false)]
public ItemContributors Contributors { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -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();
}
Expand Down Expand Up @@ -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))
);
}

Expand Down Expand Up @@ -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;
}
}
Expand Down
Loading