docker_images/csharp/wrapper/src/Models/BlobStorageInfo.cs (110 lines of code) (raw):

/* * Azure IOT End-to-End Test Wrapper Rest Api * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.0.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; using Newtonsoft.Json; namespace IO.Swagger.Models { /// <summary> /// storage info for blob upload /// </summary> [DataContract] public partial class BlobStorageInfo : IEquatable<BlobStorageInfo> { /// <summary> /// name of blob to upload /// </summary> /// <value>name of blob to upload</value> [DataMember(Name="blobName")] public string BlobName { get; set; } /// <summary> /// name of container in the azure storage host to upload into /// </summary> /// <value>name of container in the azure storage host to upload into</value> [DataMember(Name="containerName")] public string ContainerName { get; set; } /// <summary> /// correlation id to use for upload /// </summary> /// <value>correlation id to use for upload</value> [DataMember(Name="correlationId")] public string CorrelationId { get; set; } /// <summary> /// name of azure storage host /// </summary> /// <value>name of azure storage host</value> [DataMember(Name="hostName")] public string HostName { get; set; } /// <summary> /// sas token to use to authenticate with azure storage host /// </summary> /// <value>sas token to use to authenticate with azure storage host</value> [DataMember(Name="sasToken")] public string SasToken { 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 BlobStorageInfo {\n"); sb.Append(" BlobName: ").Append(BlobName).Append("\n"); sb.Append(" ContainerName: ").Append(ContainerName).Append("\n"); sb.Append(" CorrelationId: ").Append(CorrelationId).Append("\n"); sb.Append(" HostName: ").Append(HostName).Append("\n"); sb.Append(" SasToken: ").Append(SasToken).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 string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// <summary> /// Returns true if objects are equal /// </summary> /// <param name="obj">Object to be compared</param> /// <returns>Boolean</returns> public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; return obj.GetType() == GetType() && Equals((BlobStorageInfo)obj); } /// <summary> /// Returns true if BlobStorageInfo instances are equal /// </summary> /// <param name="other">Instance of BlobStorageInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(BlobStorageInfo other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return ( BlobName == other.BlobName || BlobName != null && BlobName.Equals(other.BlobName) ) && ( ContainerName == other.ContainerName || ContainerName != null && ContainerName.Equals(other.ContainerName) ) && ( CorrelationId == other.CorrelationId || CorrelationId != null && CorrelationId.Equals(other.CorrelationId) ) && ( HostName == other.HostName || HostName != null && HostName.Equals(other.HostName) ) && ( SasToken == other.SasToken || SasToken != null && SasToken.Equals(other.SasToken) ); } /// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (BlobName != null) hashCode = hashCode * 59 + BlobName.GetHashCode(); if (ContainerName != null) hashCode = hashCode * 59 + ContainerName.GetHashCode(); if (CorrelationId != null) hashCode = hashCode * 59 + CorrelationId.GetHashCode(); if (HostName != null) hashCode = hashCode * 59 + HostName.GetHashCode(); if (SasToken != null) hashCode = hashCode * 59 + SasToken.GetHashCode(); return hashCode; } } #region Operators #pragma warning disable 1591 public static bool operator ==(BlobStorageInfo left, BlobStorageInfo right) { return Equals(left, right); } public static bool operator !=(BlobStorageInfo left, BlobStorageInfo right) { return !Equals(left, right); } #pragma warning restore 1591 #endregion Operators } }