|
| 1 | +/* |
| 2 | + * VRChat API Documentation |
| 3 | + * |
| 4 | + * |
| 5 | + * The version of the OpenAPI document: 1.20.7 |
| 6 | + * Contact: vrchatapi.lpv0t@aries.fyi |
| 7 | + * Generated by: https://github.com/openapitools/openapi-generator.git |
| 8 | + */ |
| 9 | + |
| 10 | + |
| 11 | +using System; |
| 12 | +using System.Collections; |
| 13 | +using System.Collections.Generic; |
| 14 | +using System.Collections.ObjectModel; |
| 15 | +using System.Linq; |
| 16 | +using System.IO; |
| 17 | +using System.Runtime.Serialization; |
| 18 | +using System.Text; |
| 19 | +using System.Text.RegularExpressions; |
| 20 | +using Newtonsoft.Json; |
| 21 | +using Newtonsoft.Json.Converters; |
| 22 | +using Newtonsoft.Json.Linq; |
| 23 | +using System.ComponentModel.DataAnnotations; |
| 24 | +using FileParameter = VRChat.API.Client.FileParameter; |
| 25 | +using OpenAPIDateConverter = VRChat.API.Client.OpenAPIDateConverter; |
| 26 | + |
| 27 | +namespace VRChat.API.Model |
| 28 | +{ |
| 29 | + /// <summary> |
| 30 | + /// Observed create-listing payload fields. Additional fields may exist. |
| 31 | + /// </summary> |
| 32 | + [DataContract(Name = "CreateListingRequest")] |
| 33 | + public partial class CreateListingRequest : IEquatable<CreateListingRequest>, IValidatableObject |
| 34 | + { |
| 35 | + |
| 36 | + /// <summary> |
| 37 | + /// Gets or Sets ListingType |
| 38 | + /// </summary> |
| 39 | + [DataMember(Name = "listingType", IsRequired = true, EmitDefaultValue = true)] |
| 40 | + public ProductListingType ListingType { get; set; } |
| 41 | + /// <summary> |
| 42 | + /// Initializes a new instance of the <see cref="CreateListingRequest" /> class. |
| 43 | + /// </summary> |
| 44 | + [JsonConstructorAttribute] |
| 45 | + protected CreateListingRequest() { } |
| 46 | + /// <summary> |
| 47 | + /// Initializes a new instance of the <see cref="CreateListingRequest" /> class. |
| 48 | + /// </summary> |
| 49 | + /// <param name="active">active.</param> |
| 50 | + /// <param name="description">description (required).</param> |
| 51 | + /// <param name="displayName">displayName (required).</param> |
| 52 | + /// <param name="imageId">imageId (required).</param> |
| 53 | + /// <param name="listingType">listingType (required).</param> |
| 54 | + /// <param name="priceTokens">priceTokens (required).</param> |
| 55 | + /// <param name="productIds">productIds (required).</param> |
| 56 | + /// <param name="storeIds">storeIds (required).</param> |
| 57 | + public CreateListingRequest(bool active = default, string description = default, string displayName = default, string imageId = default, ProductListingType listingType = default, int priceTokens = default, List<string> productIds = default, List<string> storeIds = default) |
| 58 | + { |
| 59 | + // Allow null values for required properties to handle unexpected API responses gracefully |
| 60 | + this.Description = description; |
| 61 | + // Allow null values for required properties to handle unexpected API responses gracefully |
| 62 | + this.DisplayName = displayName; |
| 63 | + // Allow null values for required properties to handle unexpected API responses gracefully |
| 64 | + this.ImageId = imageId; |
| 65 | + this.ListingType = listingType; |
| 66 | + this.PriceTokens = priceTokens; |
| 67 | + // Allow null values for required properties to handle unexpected API responses gracefully |
| 68 | + this.ProductIds = productIds; |
| 69 | + // Allow null values for required properties to handle unexpected API responses gracefully |
| 70 | + this.StoreIds = storeIds; |
| 71 | + this.Active = active; |
| 72 | + } |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// Gets or Sets Active |
| 76 | + /// </summary> |
| 77 | + [DataMember(Name = "active", EmitDefaultValue = true)] |
| 78 | + public bool Active { get; set; } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Gets or Sets Description |
| 82 | + /// </summary> |
| 83 | + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] |
| 84 | + public string Description { get; set; } |
| 85 | + |
| 86 | + /// <summary> |
| 87 | + /// Gets or Sets DisplayName |
| 88 | + /// </summary> |
| 89 | + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] |
| 90 | + public string DisplayName { get; set; } |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// Gets or Sets ImageId |
| 94 | + /// </summary> |
| 95 | + /* |
| 96 | + <example>file_ce35d830-e20a-4df0-a6d4-5aaef4508044</example> |
| 97 | + */ |
| 98 | + [DataMember(Name = "imageId", IsRequired = true, EmitDefaultValue = true)] |
| 99 | + public string ImageId { get; set; } |
| 100 | + |
| 101 | + /// <summary> |
| 102 | + /// Gets or Sets PriceTokens |
| 103 | + /// </summary> |
| 104 | + [DataMember(Name = "priceTokens", IsRequired = true, EmitDefaultValue = true)] |
| 105 | + public int PriceTokens { get; set; } |
| 106 | + |
| 107 | + /// <summary> |
| 108 | + /// Gets or Sets ProductIds |
| 109 | + /// </summary> |
| 110 | + [DataMember(Name = "productIds", IsRequired = true, EmitDefaultValue = true)] |
| 111 | + public List<string> ProductIds { get; set; } |
| 112 | + |
| 113 | + /// <summary> |
| 114 | + /// Gets or Sets StoreIds |
| 115 | + /// </summary> |
| 116 | + [DataMember(Name = "storeIds", IsRequired = true, EmitDefaultValue = true)] |
| 117 | + public List<string> StoreIds { get; set; } |
| 118 | + |
| 119 | + /// <summary> |
| 120 | + /// Returns the string presentation of the object |
| 121 | + /// </summary> |
| 122 | + /// <returns>String presentation of the object</returns> |
| 123 | + public override string ToString() |
| 124 | + { |
| 125 | + StringBuilder sb = new StringBuilder(); |
| 126 | + sb.Append("class CreateListingRequest {\n"); |
| 127 | + sb.Append(" Active: ").Append(Active).Append("\n"); |
| 128 | + sb.Append(" Description: ").Append(Description).Append("\n"); |
| 129 | + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); |
| 130 | + sb.Append(" ImageId: ").Append(ImageId).Append("\n"); |
| 131 | + sb.Append(" ListingType: ").Append(ListingType).Append("\n"); |
| 132 | + sb.Append(" PriceTokens: ").Append(PriceTokens).Append("\n"); |
| 133 | + sb.Append(" ProductIds: ").Append(ProductIds).Append("\n"); |
| 134 | + sb.Append(" StoreIds: ").Append(StoreIds).Append("\n"); |
| 135 | + sb.Append("}\n"); |
| 136 | + return sb.ToString(); |
| 137 | + } |
| 138 | + |
| 139 | + /// <summary> |
| 140 | + /// Returns the JSON string presentation of the object |
| 141 | + /// </summary> |
| 142 | + /// <returns>JSON string presentation of the object</returns> |
| 143 | + public virtual string ToJson() |
| 144 | + { |
| 145 | + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); |
| 146 | + } |
| 147 | + |
| 148 | + /// <summary> |
| 149 | + /// Returns true if objects are equal |
| 150 | + /// </summary> |
| 151 | + /// <param name="input">Object to be compared</param> |
| 152 | + /// <returns>Boolean</returns> |
| 153 | + public override bool Equals(object input) |
| 154 | + { |
| 155 | + return this.Equals(input as CreateListingRequest); |
| 156 | + } |
| 157 | + |
| 158 | + /// <summary> |
| 159 | + /// Returns true if CreateListingRequest instances are equal |
| 160 | + /// </summary> |
| 161 | + /// <param name="input">Instance of CreateListingRequest to be compared</param> |
| 162 | + /// <returns>Boolean</returns> |
| 163 | + public bool Equals(CreateListingRequest input) |
| 164 | + { |
| 165 | + if (input == null) |
| 166 | + { |
| 167 | + return false; |
| 168 | + } |
| 169 | + return |
| 170 | + ( |
| 171 | + this.Active == input.Active || |
| 172 | + this.Active.Equals(input.Active) |
| 173 | + ) && |
| 174 | + ( |
| 175 | + this.Description == input.Description || |
| 176 | + (this.Description != null && |
| 177 | + this.Description.Equals(input.Description)) |
| 178 | + ) && |
| 179 | + ( |
| 180 | + this.DisplayName == input.DisplayName || |
| 181 | + (this.DisplayName != null && |
| 182 | + this.DisplayName.Equals(input.DisplayName)) |
| 183 | + ) && |
| 184 | + ( |
| 185 | + this.ImageId == input.ImageId || |
| 186 | + (this.ImageId != null && |
| 187 | + this.ImageId.Equals(input.ImageId)) |
| 188 | + ) && |
| 189 | + ( |
| 190 | + this.ListingType == input.ListingType || |
| 191 | + this.ListingType.Equals(input.ListingType) |
| 192 | + ) && |
| 193 | + ( |
| 194 | + this.PriceTokens == input.PriceTokens || |
| 195 | + this.PriceTokens.Equals(input.PriceTokens) |
| 196 | + ) && |
| 197 | + ( |
| 198 | + this.ProductIds == input.ProductIds || |
| 199 | + this.ProductIds != null && |
| 200 | + input.ProductIds != null && |
| 201 | + this.ProductIds.SequenceEqual(input.ProductIds) |
| 202 | + ) && |
| 203 | + ( |
| 204 | + this.StoreIds == input.StoreIds || |
| 205 | + this.StoreIds != null && |
| 206 | + input.StoreIds != null && |
| 207 | + this.StoreIds.SequenceEqual(input.StoreIds) |
| 208 | + ); |
| 209 | + } |
| 210 | + |
| 211 | + /// <summary> |
| 212 | + /// Gets the hash code |
| 213 | + /// </summary> |
| 214 | + /// <returns>Hash code</returns> |
| 215 | + public override int GetHashCode() |
| 216 | + { |
| 217 | + unchecked // Overflow is fine, just wrap |
| 218 | + { |
| 219 | + int hashCode = 41; |
| 220 | + hashCode = (hashCode * 59) + this.Active.GetHashCode(); |
| 221 | + if (this.Description != null) |
| 222 | + { |
| 223 | + hashCode = (hashCode * 59) + this.Description.GetHashCode(); |
| 224 | + } |
| 225 | + if (this.DisplayName != null) |
| 226 | + { |
| 227 | + hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); |
| 228 | + } |
| 229 | + if (this.ImageId != null) |
| 230 | + { |
| 231 | + hashCode = (hashCode * 59) + this.ImageId.GetHashCode(); |
| 232 | + } |
| 233 | + hashCode = (hashCode * 59) + this.ListingType.GetHashCode(); |
| 234 | + hashCode = (hashCode * 59) + this.PriceTokens.GetHashCode(); |
| 235 | + if (this.ProductIds != null) |
| 236 | + { |
| 237 | + hashCode = (hashCode * 59) + this.ProductIds.GetHashCode(); |
| 238 | + } |
| 239 | + if (this.StoreIds != null) |
| 240 | + { |
| 241 | + hashCode = (hashCode * 59) + this.StoreIds.GetHashCode(); |
| 242 | + } |
| 243 | + return hashCode; |
| 244 | + } |
| 245 | + } |
| 246 | + |
| 247 | + /// <summary> |
| 248 | + /// To validate all properties of the instance |
| 249 | + /// </summary> |
| 250 | + /// <param name="validationContext">Validation context</param> |
| 251 | + /// <returns>Validation Result</returns> |
| 252 | + IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) |
| 253 | + { |
| 254 | + yield break; |
| 255 | + } |
| 256 | + } |
| 257 | + |
| 258 | +} |
0 commit comments