/*
* FHT.Core.API 1.0
*
* ̨group.apiVersion:1.0
*
* OpenAPI spec version: v1
* Contact: fht@fht360.com
* 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;
namespace IO.Swagger.Model
{
#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
///
/// ChatSyncViewModel
///
[DataContract]
public partial class ChatSyncViewModel : IEquatable, IValidatableObject //Mark 555
{
///
/// FHT.Core.CommonTypes.ChatType, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
///
/// FHT.Core.CommonTypes.ChatType, FHT.Core.CommonTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[DataMember(Name="ChatType", EmitDefaultValue=false)]
public ChatTypeEnum? ChatType { get; set; }
///
/// 2. Initializes a new instance of the class.
///
[JsonConstructorAttribute]
protected ChatSyncViewModel() { }
///
/// Not Enum: Gets or Sets ChatServerId
///
[DataMember(Name="ChatServerId", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public long? ChatServerId { get; set; }
///
/// Not Enum: Gets or Sets ConversationId
///
[DataMember(Name="ConversationId", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public string ConversationId { get; private set; }
///
/// Not Enum: Gets or Sets ChatName
///
[DataMember(Name="ChatName", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public string ChatName { get; set; }
///
/// Not Enum: Gets or Sets CustomName
///
[DataMember(Name="CustomName", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public string CustomName { get; set; }
///
/// Not Enum: Gets or Sets IsCustomName
///
[DataMember(Name="IsCustomName", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsCustomName { get; set; }
///
/// Not Enum: Gets or Sets ChatAvatarUrl
///
[DataMember(Name="ChatAvatarUrl", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public ImageViewModel ChatAvatarUrl { get; set; }
///
/// Not Enum: Gets or Sets CompanyName
///
[DataMember(Name="CompanyName", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public string CompanyName { get; set; }
///
/// Not Enum: Gets or Sets IsActive
///
[DataMember(Name="IsActive", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsActive { get; set; }
///
/// Not Enum: Gets or Sets IsTemporaryChat
///
[DataMember(Name="IsTemporaryChat", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsTemporaryChat { get; set; }
///
/// Not Enum: Gets or Sets MemberIds
///
[DataMember(Name="MemberIds", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {}
public List MemberIds { get; set; }
///
/// Not Enum: Gets or Sets IsTop
///
[DataMember(Name="IsTop", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsTop { get; set; }
///
/// Not Enum: Gets or Sets IsNoDisturb
///
[DataMember(Name="IsNoDisturb", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsNoDisturb { get; set; }
///
/// Not Enum: Gets or Sets IsAdmin
///
[DataMember(Name="IsAdmin", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsAdmin { get; set; }
///
/// Not Enum: Gets or Sets LastModifiedTime
///
[DataMember(Name="LastModifiedTime", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public DateTime? LastModifiedTime { get; set; }
///
/// Not Enum: Gets or Sets IsMember
///
[DataMember(Name="IsMember", EmitDefaultValue=false)] //Mark 1 vendorExtensions: {x-isnullable=false}
public bool? IsMember { 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 ChatSyncViewModel {\n");
sb.Append(" ChatType: ").Append(ChatType).Append("\n");
sb.Append(" ChatServerId: ").Append(ChatServerId).Append("\n");
sb.Append(" ConversationId: ").Append(ConversationId).Append("\n");
sb.Append(" ChatName: ").Append(ChatName).Append("\n");
sb.Append(" CustomName: ").Append(CustomName).Append("\n");
sb.Append(" IsCustomName: ").Append(IsCustomName).Append("\n");
sb.Append(" ChatAvatarUrl: ").Append(ChatAvatarUrl).Append("\n");
sb.Append(" CompanyName: ").Append(CompanyName).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" IsTemporaryChat: ").Append(IsTemporaryChat).Append("\n");
sb.Append(" MemberIds: ").Append(MemberIds).Append("\n");
sb.Append(" IsTop: ").Append(IsTop).Append("\n");
sb.Append(" IsNoDisturb: ").Append(IsNoDisturb).Append("\n");
sb.Append(" IsAdmin: ").Append(IsAdmin).Append("\n");
sb.Append(" LastModifiedTime: ").Append(LastModifiedTime).Append("\n");
sb.Append(" IsMember: ").Append(IsMember).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
///
/// Returns the JSON string presentation of the object
///
/// JSON string presentation of the object
public string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
///
/// Returns true if objects are equal
///
/// Object to be compared
/// Boolean
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as ChatSyncViewModel);
}
///
/// Returns true if ChatSyncViewModel instances are equal
///
/// Instance of ChatSyncViewModel to be compared
/// Boolean
public bool Equals(ChatSyncViewModel other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
return false;
return
(
this.ChatType == other.ChatType ||
this.ChatType != null &&
this.ChatType.Equals(other.ChatType)
) &&
(
this.ChatServerId == other.ChatServerId ||
this.ChatServerId != null &&
this.ChatServerId.Equals(other.ChatServerId)
) &&
(
this.ConversationId == other.ConversationId ||
this.ConversationId != null &&
this.ConversationId.Equals(other.ConversationId)
) &&
(
this.ChatName == other.ChatName ||
this.ChatName != null &&
this.ChatName.Equals(other.ChatName)
) &&
(
this.CustomName == other.CustomName ||
this.CustomName != null &&
this.CustomName.Equals(other.CustomName)
) &&
(
this.IsCustomName == other.IsCustomName ||
this.IsCustomName != null &&
this.IsCustomName.Equals(other.IsCustomName)
) &&
(
this.ChatAvatarUrl == other.ChatAvatarUrl ||
this.ChatAvatarUrl != null &&
this.ChatAvatarUrl.Equals(other.ChatAvatarUrl)
) &&
(
this.CompanyName == other.CompanyName ||
this.CompanyName != null &&
this.CompanyName.Equals(other.CompanyName)
) &&
(
this.IsActive == other.IsActive ||
this.IsActive != null &&
this.IsActive.Equals(other.IsActive)
) &&
(
this.IsTemporaryChat == other.IsTemporaryChat ||
this.IsTemporaryChat != null &&
this.IsTemporaryChat.Equals(other.IsTemporaryChat)
) &&
(
this.MemberIds == other.MemberIds ||
this.MemberIds != null &&
this.MemberIds.SequenceEqual(other.MemberIds)
) &&
(
this.IsTop == other.IsTop ||
this.IsTop != null &&
this.IsTop.Equals(other.IsTop)
) &&
(
this.IsNoDisturb == other.IsNoDisturb ||
this.IsNoDisturb != null &&
this.IsNoDisturb.Equals(other.IsNoDisturb)
) &&
(
this.IsAdmin == other.IsAdmin ||
this.IsAdmin != null &&
this.IsAdmin.Equals(other.IsAdmin)
) &&
(
this.LastModifiedTime == other.LastModifiedTime ||
this.LastModifiedTime != null &&
this.LastModifiedTime.Equals(other.LastModifiedTime)
) &&
(
this.IsMember == other.IsMember ||
this.IsMember != null &&
this.IsMember.Equals(other.IsMember)
);
}
///
/// Gets the hash code
///
/// Hash code
public override int GetHashCode()
{
// credit: http://stackoverflow.com/a/263416/677735
unchecked // Overflow is fine, just wrap
{
int hash = 41;
// Suitable nullity checks etc, of course :)
if (this.ChatType != null)
hash = hash * 59 + this.ChatType.GetHashCode();
if (this.ChatServerId != null)
hash = hash * 59 + this.ChatServerId.GetHashCode();
if (this.ConversationId != null)
hash = hash * 59 + this.ConversationId.GetHashCode();
if (this.ChatName != null)
hash = hash * 59 + this.ChatName.GetHashCode();
if (this.CustomName != null)
hash = hash * 59 + this.CustomName.GetHashCode();
if (this.IsCustomName != null)
hash = hash * 59 + this.IsCustomName.GetHashCode();
if (this.ChatAvatarUrl != null)
hash = hash * 59 + this.ChatAvatarUrl.GetHashCode();
if (this.CompanyName != null)
hash = hash * 59 + this.CompanyName.GetHashCode();
if (this.IsActive != null)
hash = hash * 59 + this.IsActive.GetHashCode();
if (this.IsTemporaryChat != null)
hash = hash * 59 + this.IsTemporaryChat.GetHashCode();
if (this.MemberIds != null)
hash = hash * 59 + this.MemberIds.GetHashCode();
if (this.IsTop != null)
hash = hash * 59 + this.IsTop.GetHashCode();
if (this.IsNoDisturb != null)
hash = hash * 59 + this.IsNoDisturb.GetHashCode();
if (this.IsAdmin != null)
hash = hash * 59 + this.IsAdmin.GetHashCode();
if (this.LastModifiedTime != null)
hash = hash * 59 + this.LastModifiedTime.GetHashCode();
if (this.IsMember != null)
hash = hash * 59 + this.IsMember.GetHashCode();
return hash;
}
}
public IEnumerable Validate(ValidationContext validationContext)
{
yield break;
}
}
#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
}