/*
* 后台API
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: Admin
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;
namespace IO.Swagger.Model
{
///
/// QiNiuImage
///
[DataContract]
public partial class QiNiuImage : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// 横轴边距.
/// 纵轴边距.
/// 图片地址.
/// 是否需要处理成圆角.
/// 方向类型 1:左上 2:中上 3:右上 4:左中 5:正中 6:右中 7:左下 8:中下 9:右下.
/// 图片宽,如果为0,则使用图片默认宽度.
/// 图片高,如果为0,则使用图片默认高度.
public QiNiuImage(int? distanceX = default(int?), int? distanceY = default(int?), string url = default(string), bool? isRound = default(bool?), int? positionType = default(int?), int? width = default(int?), int? height = default(int?))
{
this.DistanceX = distanceX;
this.DistanceY = distanceY;
this.Url = url;
this.IsRound = isRound;
this.PositionType = positionType;
this.Width = width;
this.Height = height;
}
///
/// 横轴边距
///
/// 横轴边距
[DataMember(Name="distanceX", EmitDefaultValue=false)]
public int? DistanceX { get; set; }
///
/// 纵轴边距
///
/// 纵轴边距
[DataMember(Name="distanceY", EmitDefaultValue=false)]
public int? DistanceY { get; set; }
///
/// 图片地址
///
/// 图片地址
[DataMember(Name="url", EmitDefaultValue=false)]
public string Url { get; set; }
///
/// 是否需要处理成圆角
///
/// 是否需要处理成圆角
[DataMember(Name="isRound", EmitDefaultValue=false)]
public bool? IsRound { get; set; }
///
/// 方向类型 1:左上 2:中上 3:右上 4:左中 5:正中 6:右中 7:左下 8:中下 9:右下
///
/// 方向类型 1:左上 2:中上 3:右上 4:左中 5:正中 6:右中 7:左下 8:中下 9:右下
[DataMember(Name="positionType", EmitDefaultValue=false)]
public int? PositionType { get; set; }
///
/// 图片宽,如果为0,则使用图片默认宽度
///
/// 图片宽,如果为0,则使用图片默认宽度
[DataMember(Name="width", EmitDefaultValue=false)]
public int? Width { get; set; }
///
/// 图片高,如果为0,则使用图片默认高度
///
/// 图片高,如果为0,则使用图片默认高度
[DataMember(Name="height", EmitDefaultValue=false)]
public int? Height { 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 QiNiuImage {\n");
sb.Append(" DistanceX: ").Append(DistanceX).Append("\n");
sb.Append(" DistanceY: ").Append(DistanceY).Append("\n");
sb.Append(" Url: ").Append(Url).Append("\n");
sb.Append(" IsRound: ").Append(IsRound).Append("\n");
sb.Append(" PositionType: ").Append(PositionType).Append("\n");
sb.Append(" Width: ").Append(Width).Append("\n");
sb.Append(" Height: ").Append(Height).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 QiNiuImage);
}
///
/// Returns true if QiNiuImage instances are equal
///
/// Instance of QiNiuImage to be compared
/// Boolean
public bool Equals(QiNiuImage input)
{
if (input == null)
return false;
return
(
this.DistanceX == input.DistanceX ||
(this.DistanceX != null &&
this.DistanceX.Equals(input.DistanceX))
) &&
(
this.DistanceY == input.DistanceY ||
(this.DistanceY != null &&
this.DistanceY.Equals(input.DistanceY))
) &&
(
this.Url == input.Url ||
(this.Url != null &&
this.Url.Equals(input.Url))
) &&
(
this.IsRound == input.IsRound ||
(this.IsRound != null &&
this.IsRound.Equals(input.IsRound))
) &&
(
this.PositionType == input.PositionType ||
(this.PositionType != null &&
this.PositionType.Equals(input.PositionType))
) &&
(
this.Width == input.Width ||
(this.Width != null &&
this.Width.Equals(input.Width))
) &&
(
this.Height == input.Height ||
(this.Height != null &&
this.Height.Equals(input.Height))
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.DistanceX != null)
hashCode = hashCode * 59 + this.DistanceX.GetHashCode();
if (this.DistanceY != null)
hashCode = hashCode * 59 + this.DistanceY.GetHashCode();
if (this.Url != null)
hashCode = hashCode * 59 + this.Url.GetHashCode();
if (this.IsRound != null)
hashCode = hashCode * 59 + this.IsRound.GetHashCode();
if (this.PositionType != null)
hashCode = hashCode * 59 + this.PositionType.GetHashCode();
if (this.Width != null)
hashCode = hashCode * 59 + this.Width.GetHashCode();
if (this.Height != null)
hashCode = hashCode * 59 + this.Height.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}