/* * Amazon Shipping API * * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments. * * OpenAPI spec version: v2 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Text; using Newtonsoft.Json; namespace Amazon.SellingPartnerApiSDK.AmazonSpApiSDK.Models.ShippingV2 { /// /// The value-added services available for purchase with a shipping service offering. /// [DataContract] public partial class AvailableValueAddedServiceGroup : IEquatable, IValidatableObject { /// /// The type of the value-added service group. /// /// The type of the value-added service group. [DataMember(Name="groupId", EmitDefaultValue=false)] public string GroupId { get; set; } /// /// The name of the value-added service group. /// /// The name of the value-added service group. [DataMember(Name="groupDescription", EmitDefaultValue=false)] public string GroupDescription { get; set; } /// /// When true, one or more of the value-added services listed must be specified. /// /// When true, one or more of the value-added services listed must be specified. [DataMember(Name="isRequired", EmitDefaultValue=false)] public bool? IsRequired { get; set; } /// /// A list of optional value-added services available for purchase with a shipping service offering. /// /// A list of optional value-added services available for purchase with a shipping service offering. [DataMember(Name="valueAddedServices", EmitDefaultValue=false)] public List ValueAddedServices { 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 AvailableValueAddedServiceGroup {\n"); sb.Append(" GroupId: ").Append(GroupId).Append("\n"); sb.Append(" GroupDescription: ").Append(GroupDescription).Append("\n"); sb.Append(" IsRequired: ").Append(IsRequired).Append("\n"); sb.Append(" ValueAddedServices: ").Append(ValueAddedServices).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 AvailableValueAddedServiceGroup); } /// /// Returns true if AvailableValueAddedServiceGroup instances are equal /// /// Instance of AvailableValueAddedServiceGroup to be compared /// Boolean public bool Equals(AvailableValueAddedServiceGroup input) { if (input == null) return false; return ( this.GroupId == input.GroupId || (this.GroupId != null && this.GroupId.Equals(input.GroupId)) ) && ( this.GroupDescription == input.GroupDescription || (this.GroupDescription != null && this.GroupDescription.Equals(input.GroupDescription)) ) && ( this.IsRequired == input.IsRequired || (this.IsRequired != null && this.IsRequired.Equals(input.IsRequired)) ) && ( this.ValueAddedServices == input.ValueAddedServices || this.ValueAddedServices != null && this.ValueAddedServices.SequenceEqual(input.ValueAddedServices) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (this.GroupId != null) hashCode = hashCode * 59 + this.GroupId.GetHashCode(); if (this.GroupDescription != null) hashCode = hashCode * 59 + this.GroupDescription.GetHashCode(); if (this.IsRequired != null) hashCode = hashCode * 59 + this.IsRequired.GetHashCode(); if (this.ValueAddedServices != null) hashCode = hashCode * 59 + this.ValueAddedServices.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }