/*
* 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
{
///
/// Service Related Info
///
[DataContract]
public partial class Service : IEquatable, IValidatableObject
{
///
/// Gets or Sets Id
///
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
///
/// Gets or Sets Name
///
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { 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 Service {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Name: ").Append(Name).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 Service);
}
///
/// Returns true if Service instances are equal
///
/// Instance of Service to be compared
/// Boolean
public bool Equals(Service input)
{
if (input == null)
return false;
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(
ValidationContext validationContext)
{
yield break;
}
}
}