2025-04-24 18:31:27 +08:00

228 lines
8.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 后台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
{
/// <summary>
/// QiNiuImage
/// </summary>
[DataContract]
public partial class QiNiuImage : IEquatable<QiNiuImage>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="QiNiuImage" /> class.
/// </summary>
/// <param name="distanceX">横轴边距.</param>
/// <param name="distanceY">纵轴边距.</param>
/// <param name="url">图片地址.</param>
/// <param name="isRound">是否需要处理成圆角.</param>
/// <param name="positionType">方向类型 1左上 2中上 3右上 4左中 5正中 6右中 7左下 8中下 9右下.</param>
/// <param name="width">图片宽如果为0则使用图片默认宽度.</param>
/// <param name="height">图片高如果为0则使用图片默认高度.</param>
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;
}
/// <summary>
/// 横轴边距
/// </summary>
/// <value>横轴边距</value>
[DataMember(Name="distanceX", EmitDefaultValue=false)]
public int? DistanceX { get; set; }
/// <summary>
/// 纵轴边距
/// </summary>
/// <value>纵轴边距</value>
[DataMember(Name="distanceY", EmitDefaultValue=false)]
public int? DistanceY { get; set; }
/// <summary>
/// 图片地址
/// </summary>
/// <value>图片地址</value>
[DataMember(Name="url", EmitDefaultValue=false)]
public string Url { get; set; }
/// <summary>
/// 是否需要处理成圆角
/// </summary>
/// <value>是否需要处理成圆角</value>
[DataMember(Name="isRound", EmitDefaultValue=false)]
public bool? IsRound { get; set; }
/// <summary>
/// 方向类型 1左上 2中上 3右上 4左中 5正中 6右中 7左下 8中下 9右下
/// </summary>
/// <value>方向类型 1左上 2中上 3右上 4左中 5正中 6右中 7左下 8中下 9右下</value>
[DataMember(Name="positionType", EmitDefaultValue=false)]
public int? PositionType { get; set; }
/// <summary>
/// 图片宽如果为0则使用图片默认宽度
/// </summary>
/// <value>图片宽如果为0则使用图片默认宽度</value>
[DataMember(Name="width", EmitDefaultValue=false)]
public int? Width { get; set; }
/// <summary>
/// 图片高如果为0则使用图片默认高度
/// </summary>
/// <value>图片高如果为0则使用图片默认高度</value>
[DataMember(Name="height", EmitDefaultValue=false)]
public int? Height { 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 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();
}
/// <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 QiNiuImage);
}
/// <summary>
/// Returns true if QiNiuImage instances are equal
/// </summary>
/// <param name="input">Instance of QiNiuImage to be compared</param>
/// <returns>Boolean</returns>
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))
);
}
/// <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.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;
}
}
/// <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;
}
}
}