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.
287 lines
12 KiB
C#
287 lines
12 KiB
C#
5 months ago
|
/*
|
||
|
* 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.Linq;
|
||
|
using System.Runtime.Serialization;
|
||
|
using System.Text;
|
||
|
using Newtonsoft.Json;
|
||
|
using Newtonsoft.Json.Converters;
|
||
|
|
||
|
namespace Amazon.SellingPartnerApiSDK.AmazonSpApiSDK.Models.ShippingV2
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Access point details
|
||
|
/// </summary>
|
||
|
[DataContract]
|
||
|
public partial class AccessPoint : IEquatable<AccessPoint>, IValidatableObject
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Gets or Sets Type
|
||
|
/// </summary>
|
||
|
[DataMember(Name="type", EmitDefaultValue=false)]
|
||
|
public AccessPointType? Type { get; set; }
|
||
|
/// <summary>
|
||
|
/// Defines AssistanceType
|
||
|
/// </summary>
|
||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||
|
public enum AssistanceTypeEnum
|
||
|
{
|
||
|
|
||
|
/// <summary>
|
||
|
/// Enum STAFFASSISTED for value: STAFF_ASSISTED
|
||
|
/// </summary>
|
||
|
[EnumMember(Value = "STAFF_ASSISTED")]
|
||
|
STAFFASSISTED = 1,
|
||
|
|
||
|
/// <summary>
|
||
|
/// Enum SELFASSISTED for value: SELF_ASSISTED
|
||
|
/// </summary>
|
||
|
[EnumMember(Value = "SELF_ASSISTED")]
|
||
|
SELFASSISTED = 2
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets AssistanceType
|
||
|
/// </summary>
|
||
|
[DataMember(Name="assistanceType", EmitDefaultValue=false)]
|
||
|
public AssistanceTypeEnum? AssistanceType { get; set; }
|
||
|
/// <summary>
|
||
|
/// Initializes a new instance of the <see cref="AccessPoint" /> class.
|
||
|
/// </summary>
|
||
|
/// <param name="accessPointId">accessPointId.</param>
|
||
|
/// <param name="name">Name of entity (store/hub etc) where this access point is located.</param>
|
||
|
/// <param name="timezone">Timezone of access point.</param>
|
||
|
/// <param name="type">type.</param>
|
||
|
/// <param name="accessibilityAttributes">accessibilityAttributes.</param>
|
||
|
/// <param name="address">address.</param>
|
||
|
/// <param name="exceptionOperatingHours">exceptionOperatingHours.</param>
|
||
|
/// <param name="assistanceType">assistanceType.</param>
|
||
|
/// <param name="score">The score of access point, based on proximity to postal code and sorting preference. This can be used to sort access point results on shipper's end..</param>
|
||
|
/// <param name="standardOperatingHours">standardOperatingHours.</param>
|
||
|
public AccessPoint(AccessPointId accessPointId = default(AccessPointId), string name = default(string), string timezone = default(string), AccessPointType? type = default(AccessPointType?), AccessibilityAttributes accessibilityAttributes = default(AccessibilityAttributes), Address address = default(Address), List<ExceptionOperatingHours> exceptionOperatingHours = default(List<ExceptionOperatingHours>), AssistanceTypeEnum? assistanceType = default(AssistanceTypeEnum?), string score = default(string), DayOfWeekTimeMap standardOperatingHours = default(DayOfWeekTimeMap))
|
||
|
{
|
||
|
this.AccessPointId = accessPointId;
|
||
|
this.Name = name;
|
||
|
this.Timezone = timezone;
|
||
|
this.Type = type;
|
||
|
this.AccessibilityAttributes = accessibilityAttributes;
|
||
|
this.Address = address;
|
||
|
this.ExceptionOperatingHours = exceptionOperatingHours;
|
||
|
this.AssistanceType = assistanceType;
|
||
|
this.Score = score;
|
||
|
this.StandardOperatingHours = standardOperatingHours;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets AccessPointId
|
||
|
/// </summary>
|
||
|
[DataMember(Name="accessPointId", EmitDefaultValue=false)]
|
||
|
public AccessPointId AccessPointId { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Name of entity (store/hub etc) where this access point is located
|
||
|
/// </summary>
|
||
|
/// <value>Name of entity (store/hub etc) where this access point is located</value>
|
||
|
[DataMember(Name="name", EmitDefaultValue=false)]
|
||
|
public string Name { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Timezone of access point
|
||
|
/// </summary>
|
||
|
/// <value>Timezone of access point</value>
|
||
|
[DataMember(Name="timezone", EmitDefaultValue=false)]
|
||
|
public string Timezone { get; set; }
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets AccessibilityAttributes
|
||
|
/// </summary>
|
||
|
[DataMember(Name="accessibilityAttributes", EmitDefaultValue=false)]
|
||
|
public AccessibilityAttributes AccessibilityAttributes { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets Address
|
||
|
/// </summary>
|
||
|
[DataMember(Name="address", EmitDefaultValue=false)]
|
||
|
public Address Address { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets ExceptionOperatingHours
|
||
|
/// </summary>
|
||
|
[DataMember(Name="exceptionOperatingHours", EmitDefaultValue=false)]
|
||
|
public List<ExceptionOperatingHours> ExceptionOperatingHours { get; set; }
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// The score of access point, based on proximity to postal code and sorting preference. This can be used to sort access point results on shipper's end.
|
||
|
/// </summary>
|
||
|
/// <value>The score of access point, based on proximity to postal code and sorting preference. This can be used to sort access point results on shipper's end.</value>
|
||
|
[DataMember(Name="score", EmitDefaultValue=false)]
|
||
|
public string Score { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Gets or Sets StandardOperatingHours
|
||
|
/// </summary>
|
||
|
[DataMember(Name="standardOperatingHours", EmitDefaultValue=false)]
|
||
|
public DayOfWeekTimeMap StandardOperatingHours { 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 AccessPoint {\n");
|
||
|
sb.Append(" AccessPointId: ").Append(AccessPointId).Append("\n");
|
||
|
sb.Append(" Name: ").Append(Name).Append("\n");
|
||
|
sb.Append(" Timezone: ").Append(Timezone).Append("\n");
|
||
|
sb.Append(" Type: ").Append(Type).Append("\n");
|
||
|
sb.Append(" AccessibilityAttributes: ").Append(AccessibilityAttributes).Append("\n");
|
||
|
sb.Append(" Address: ").Append(Address).Append("\n");
|
||
|
sb.Append(" ExceptionOperatingHours: ").Append(ExceptionOperatingHours).Append("\n");
|
||
|
sb.Append(" AssistanceType: ").Append(AssistanceType).Append("\n");
|
||
|
sb.Append(" Score: ").Append(Score).Append("\n");
|
||
|
sb.Append(" StandardOperatingHours: ").Append(StandardOperatingHours).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 AccessPoint);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns true if AccessPoint instances are equal
|
||
|
/// </summary>
|
||
|
/// <param name="input">Instance of AccessPoint to be compared</param>
|
||
|
/// <returns>Boolean</returns>
|
||
|
public bool Equals(AccessPoint input)
|
||
|
{
|
||
|
if (input == null)
|
||
|
return false;
|
||
|
|
||
|
return
|
||
|
(
|
||
|
this.AccessPointId == input.AccessPointId ||
|
||
|
(this.AccessPointId != null &&
|
||
|
this.AccessPointId.Equals(input.AccessPointId))
|
||
|
) &&
|
||
|
(
|
||
|
this.Name == input.Name ||
|
||
|
(this.Name != null &&
|
||
|
this.Name.Equals(input.Name))
|
||
|
) &&
|
||
|
(
|
||
|
this.Timezone == input.Timezone ||
|
||
|
(this.Timezone != null &&
|
||
|
this.Timezone.Equals(input.Timezone))
|
||
|
) &&
|
||
|
(
|
||
|
this.Type == input.Type ||
|
||
|
(this.Type != null &&
|
||
|
this.Type.Equals(input.Type))
|
||
|
) &&
|
||
|
(
|
||
|
this.AccessibilityAttributes == input.AccessibilityAttributes ||
|
||
|
(this.AccessibilityAttributes != null &&
|
||
|
this.AccessibilityAttributes.Equals(input.AccessibilityAttributes))
|
||
|
) &&
|
||
|
(
|
||
|
this.Address == input.Address ||
|
||
|
(this.Address != null &&
|
||
|
this.Address.Equals(input.Address))
|
||
|
) &&
|
||
|
(
|
||
|
this.ExceptionOperatingHours == input.ExceptionOperatingHours ||
|
||
|
this.ExceptionOperatingHours != null &&
|
||
|
this.ExceptionOperatingHours.SequenceEqual(input.ExceptionOperatingHours)
|
||
|
) &&
|
||
|
(
|
||
|
this.AssistanceType == input.AssistanceType ||
|
||
|
(this.AssistanceType != null &&
|
||
|
this.AssistanceType.Equals(input.AssistanceType))
|
||
|
) &&
|
||
|
(
|
||
|
this.Score == input.Score ||
|
||
|
(this.Score != null &&
|
||
|
this.Score.Equals(input.Score))
|
||
|
) &&
|
||
|
(
|
||
|
this.StandardOperatingHours == input.StandardOperatingHours ||
|
||
|
(this.StandardOperatingHours != null &&
|
||
|
this.StandardOperatingHours.Equals(input.StandardOperatingHours))
|
||
|
);
|
||
|
}
|
||
|
|
||
|
/// <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.AccessPointId != null)
|
||
|
hashCode = hashCode * 59 + this.AccessPointId.GetHashCode();
|
||
|
if (this.Name != null)
|
||
|
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||
|
if (this.Timezone != null)
|
||
|
hashCode = hashCode * 59 + this.Timezone.GetHashCode();
|
||
|
if (this.Type != null)
|
||
|
hashCode = hashCode * 59 + this.Type.GetHashCode();
|
||
|
if (this.AccessibilityAttributes != null)
|
||
|
hashCode = hashCode * 59 + this.AccessibilityAttributes.GetHashCode();
|
||
|
if (this.Address != null)
|
||
|
hashCode = hashCode * 59 + this.Address.GetHashCode();
|
||
|
if (this.ExceptionOperatingHours != null)
|
||
|
hashCode = hashCode * 59 + this.ExceptionOperatingHours.GetHashCode();
|
||
|
if (this.AssistanceType != null)
|
||
|
hashCode = hashCode * 59 + this.AssistanceType.GetHashCode();
|
||
|
if (this.Score != null)
|
||
|
hashCode = hashCode * 59 + this.Score.GetHashCode();
|
||
|
if (this.StandardOperatingHours != null)
|
||
|
hashCode = hashCode * 59 + this.StandardOperatingHours.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;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|