/* * 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.Runtime.Serialization; using System.Text; using Newtonsoft.Json; namespace Amazon.SellingPartnerApiSDK.AmazonSpApiSDK.Models.ShippingV2 { /// /// The supported document types for a service offering. /// [DataContract] public partial class SupportedDocumentDetail : IEquatable, IValidatableObject { /// /// Gets or Sets Name /// [DataMember(Name="name", EmitDefaultValue=false)] public DocumentType Name { get; set; } /// /// When true, the supported document type is required. /// /// When true, the supported document type is required. [DataMember(Name="isMandatory", EmitDefaultValue=false)] public bool? IsMandatory { 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 SupportedDocumentDetail {\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" IsMandatory: ").Append(IsMandatory).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 SupportedDocumentDetail); } /// /// Returns true if SupportedDocumentDetail instances are equal /// /// Instance of SupportedDocumentDetail to be compared /// Boolean public bool Equals(SupportedDocumentDetail input) { if (input == null) return false; return ( this.Name == input.Name || (this.Name != null && this.Name.Equals(input.Name)) ) && ( this.IsMandatory == input.IsMandatory || (this.IsMandatory != null && this.IsMandatory.Equals(input.IsMandatory)) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (this.Name != null) hashCode = hashCode * 59 + this.Name.GetHashCode(); if (this.IsMandatory != null) hashCode = hashCode * 59 + this.IsMandatory.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }