You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
4.3 KiB
C#
125 lines
4.3 KiB
C#
/*
|
|
* 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
|
|
{
|
|
/// <summary>
|
|
/// The supported document types for a service offering.
|
|
/// </summary>
|
|
[DataContract]
|
|
public partial class SupportedDocumentDetail : IEquatable<SupportedDocumentDetail>, IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// Gets or Sets Name
|
|
/// </summary>
|
|
[DataMember(Name="name", EmitDefaultValue=false)]
|
|
public DocumentType Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// When true, the supported document type is required.
|
|
/// </summary>
|
|
/// <value>When true, the supported document type is required.</value>
|
|
[DataMember(Name="isMandatory", EmitDefaultValue=false)]
|
|
public bool? IsMandatory { 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 SupportedDocumentDetail {\n");
|
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
|
sb.Append(" IsMandatory: ").Append(IsMandatory).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 SupportedDocumentDetail);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns true if SupportedDocumentDetail instances are equal
|
|
/// </summary>
|
|
/// <param name="input">Instance of SupportedDocumentDetail to be compared</param>
|
|
/// <returns>Boolean</returns>
|
|
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))
|
|
);
|
|
}
|
|
|
|
/// <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.Name != null)
|
|
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
|
if (this.IsMandatory != null)
|
|
hashCode = hashCode * 59 + this.IsMandatory.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;
|
|
}
|
|
}
|
|
|
|
}
|