/**
 * Autogenerated by Thrift Compiler (0.14.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Thrift;
using Thrift.Collections;
using System.ServiceModel;
using System.Runtime.Serialization;


#pragma warning disable IDE0079  // remove unnecessary pragmas
#pragma warning disable IDE1006  // parts of the code use IDL spelling

namespace ThriftTest
{
public static class ThriftTestExtensions
{
  public static bool Equals(this Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>> instance, object that)
  {
    if (!(that is Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>> DeepCopy(this Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>> source)
  {
    if (source == null)
      return null;

    var tmp356 = new Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>(source.Count);
    foreach (var pair in source)
      tmp356.Add((pair.Key != null) ? pair.Key.DeepCopy() : null, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp356;
  }


  public static bool Equals(this Dictionary<global::ThriftTest.Insanity, string> instance, object that)
  {
    if (!(that is Dictionary<global::ThriftTest.Insanity, string> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<global::ThriftTest.Insanity, string> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<global::ThriftTest.Insanity, string> DeepCopy(this Dictionary<global::ThriftTest.Insanity, string> source)
  {
    if (source == null)
      return null;

    var tmp357 = new Dictionary<global::ThriftTest.Insanity, string>(source.Count);
    foreach (var pair in source)
      tmp357.Add((pair.Key != null) ? pair.Key.DeepCopy() : null, (pair.Value != null) ? pair.Value : null);
    return tmp357;
  }


  public static bool Equals(this Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity> instance, object that)
  {
    if (!(that is Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity> DeepCopy(this Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity> source)
  {
    if (source == null)
      return null;

    var tmp358 = new Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>(source.Count);
    foreach (var pair in source)
      tmp358.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp358;
  }


  public static bool Equals(this Dictionary<global::ThriftTest.Numberz, long> instance, object that)
  {
    if (!(that is Dictionary<global::ThriftTest.Numberz, long> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<global::ThriftTest.Numberz, long> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<global::ThriftTest.Numberz, long> DeepCopy(this Dictionary<global::ThriftTest.Numberz, long> source)
  {
    if (source == null)
      return null;

    var tmp359 = new Dictionary<global::ThriftTest.Numberz, long>(source.Count);
    foreach (var pair in source)
      tmp359.Add(pair.Key, pair.Value);
    return tmp359;
  }


  public static bool Equals(this Dictionary<int, Dictionary<int, int>> instance, object that)
  {
    if (!(that is Dictionary<int, Dictionary<int, int>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<int, Dictionary<int, int>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<int, Dictionary<int, int>> DeepCopy(this Dictionary<int, Dictionary<int, int>> source)
  {
    if (source == null)
      return null;

    var tmp360 = new Dictionary<int, Dictionary<int, int>>(source.Count);
    foreach (var pair in source)
      tmp360.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp360;
  }


  public static bool Equals(this Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>> instance, object that)
  {
    if (!(that is Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>> DeepCopy(this Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>> source)
  {
    if (source == null)
      return null;

    var tmp361 = new Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>(source.Count);
    foreach (var pair in source)
      tmp361.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp361;
  }


  public static bool Equals(this Dictionary<int, THashSet<string>> instance, object that)
  {
    if (!(that is Dictionary<int, THashSet<string>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<int, THashSet<string>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<int, THashSet<string>> DeepCopy(this Dictionary<int, THashSet<string>> source)
  {
    if (source == null)
      return null;

    var tmp362 = new Dictionary<int, THashSet<string>>(source.Count);
    foreach (var pair in source)
      tmp362.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp362;
  }


  public static bool Equals(this Dictionary<int, int> instance, object that)
  {
    if (!(that is Dictionary<int, int> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<int, int> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<int, int> DeepCopy(this Dictionary<int, int> source)
  {
    if (source == null)
      return null;

    var tmp363 = new Dictionary<int, int>(source.Count);
    foreach (var pair in source)
      tmp363.Add(pair.Key, pair.Value);
    return tmp363;
  }


  public static bool Equals(this Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>> instance, object that)
  {
    if (!(that is Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>> DeepCopy(this Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>> source)
  {
    if (source == null)
      return null;

    var tmp364 = new Dictionary<long, Dictionary<global::ThriftTest.Numberz, global::ThriftTest.Insanity>>(source.Count);
    foreach (var pair in source)
      tmp364.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp364;
  }


  public static bool Equals(this Dictionary<short, string> instance, object that)
  {
    if (!(that is Dictionary<short, string> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<short, string> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<short, string> DeepCopy(this Dictionary<short, string> source)
  {
    if (source == null)
      return null;

    var tmp365 = new Dictionary<short, string>(source.Count);
    foreach (var pair in source)
      tmp365.Add(pair.Key, (pair.Value != null) ? pair.Value : null);
    return tmp365;
  }


  public static bool Equals(this Dictionary<string, string> instance, object that)
  {
    if (!(that is Dictionary<string, string> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<string, string> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<string, string> DeepCopy(this Dictionary<string, string> source)
  {
    if (source == null)
      return null;

    var tmp366 = new Dictionary<string, string>(source.Count);
    foreach (var pair in source)
      tmp366.Add((pair.Key != null) ? pair.Key : null, (pair.Value != null) ? pair.Value : null);
    return tmp366;
  }


  public static bool Equals(this List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>> instance, object that)
  {
    if (!(that is List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>> DeepCopy(this List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>> source)
  {
    if (source == null)
      return null;

    var tmp367 = new List<Dictionary<THashSet<int>, Dictionary<int, THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>>>>(source.Count);
    foreach (var elem in source)
      tmp367.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp367;
  }


  public static bool Equals(this List<Dictionary<global::ThriftTest.Insanity, string>> instance, object that)
  {
    if (!(that is List<Dictionary<global::ThriftTest.Insanity, string>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<Dictionary<global::ThriftTest.Insanity, string>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<Dictionary<global::ThriftTest.Insanity, string>> DeepCopy(this List<Dictionary<global::ThriftTest.Insanity, string>> source)
  {
    if (source == null)
      return null;

    var tmp368 = new List<Dictionary<global::ThriftTest.Insanity, string>>(source.Count);
    foreach (var elem in source)
      tmp368.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp368;
  }


  public static bool Equals(this List<Dictionary<int, THashSet<string>>> instance, object that)
  {
    if (!(that is List<Dictionary<int, THashSet<string>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<Dictionary<int, THashSet<string>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<Dictionary<int, THashSet<string>>> DeepCopy(this List<Dictionary<int, THashSet<string>>> source)
  {
    if (source == null)
      return null;

    var tmp369 = new List<Dictionary<int, THashSet<string>>>(source.Count);
    foreach (var elem in source)
      tmp369.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp369;
  }


  public static bool Equals(this List<List<List<global::ThriftTest.Bonk>>> instance, object that)
  {
    if (!(that is List<List<List<global::ThriftTest.Bonk>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<List<List<global::ThriftTest.Bonk>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<List<List<global::ThriftTest.Bonk>>> DeepCopy(this List<List<List<global::ThriftTest.Bonk>>> source)
  {
    if (source == null)
      return null;

    var tmp370 = new List<List<List<global::ThriftTest.Bonk>>>(source.Count);
    foreach (var elem in source)
      tmp370.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp370;
  }


  public static bool Equals(this List<List<List<int>>> instance, object that)
  {
    if (!(that is List<List<List<int>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<List<List<int>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<List<List<int>>> DeepCopy(this List<List<List<int>>> source)
  {
    if (source == null)
      return null;

    var tmp371 = new List<List<List<int>>>(source.Count);
    foreach (var elem in source)
      tmp371.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp371;
  }


  public static bool Equals(this List<List<global::ThriftTest.Bonk>> instance, object that)
  {
    if (!(that is List<List<global::ThriftTest.Bonk>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<List<global::ThriftTest.Bonk>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<List<global::ThriftTest.Bonk>> DeepCopy(this List<List<global::ThriftTest.Bonk>> source)
  {
    if (source == null)
      return null;

    var tmp372 = new List<List<global::ThriftTest.Bonk>>(source.Count);
    foreach (var elem in source)
      tmp372.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp372;
  }


  public static bool Equals(this List<List<int>> instance, object that)
  {
    if (!(that is List<List<int>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<List<int>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<List<int>> DeepCopy(this List<List<int>> source)
  {
    if (source == null)
      return null;

    var tmp373 = new List<List<int>>(source.Count);
    foreach (var elem in source)
      tmp373.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp373;
  }


  public static bool Equals(this List<THashSet<int>> instance, object that)
  {
    if (!(that is List<THashSet<int>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<THashSet<int>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<THashSet<int>> DeepCopy(this List<THashSet<int>> source)
  {
    if (source == null)
      return null;

    var tmp374 = new List<THashSet<int>>(source.Count);
    foreach (var elem in source)
      tmp374.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp374;
  }


  public static bool Equals(this List<global::ThriftTest.Bonk> instance, object that)
  {
    if (!(that is List<global::ThriftTest.Bonk> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<global::ThriftTest.Bonk> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<global::ThriftTest.Bonk> DeepCopy(this List<global::ThriftTest.Bonk> source)
  {
    if (source == null)
      return null;

    var tmp375 = new List<global::ThriftTest.Bonk>(source.Count);
    foreach (var elem in source)
      tmp375.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp375;
  }


  public static bool Equals(this List<global::ThriftTest.Xtruct> instance, object that)
  {
    if (!(that is List<global::ThriftTest.Xtruct> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<global::ThriftTest.Xtruct> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<global::ThriftTest.Xtruct> DeepCopy(this List<global::ThriftTest.Xtruct> source)
  {
    if (source == null)
      return null;

    var tmp376 = new List<global::ThriftTest.Xtruct>(source.Count);
    foreach (var elem in source)
      tmp376.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp376;
  }


  public static bool Equals(this List<int> instance, object that)
  {
    if (!(that is List<int> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<int> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<int> DeepCopy(this List<int> source)
  {
    if (source == null)
      return null;

    var tmp377 = new List<int>(source.Count);
    foreach (var elem in source)
      tmp377.Add(elem);
    return tmp377;
  }


  public static bool Equals(this List<string> instance, object that)
  {
    if (!(that is List<string> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<string> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<string> DeepCopy(this List<string> source)
  {
    if (source == null)
      return null;

    var tmp378 = new List<string>(source.Count);
    foreach (var elem in source)
      tmp378.Add((elem != null) ? elem : null);
    return tmp378;
  }


  public static bool Equals(this THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>> instance, object that)
  {
    if (!(that is THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>> DeepCopy(this THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>> source)
  {
    if (source == null)
      return null;

    var tmp379 = new THashSet<List<Dictionary<global::ThriftTest.Insanity, string>>>(source.Count);
    foreach (var elem in source)
      tmp379.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp379;
  }


  public static bool Equals(this THashSet<global::ThriftTest.Insanity> instance, object that)
  {
    if (!(that is THashSet<global::ThriftTest.Insanity> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this THashSet<global::ThriftTest.Insanity> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static THashSet<global::ThriftTest.Insanity> DeepCopy(this THashSet<global::ThriftTest.Insanity> source)
  {
    if (source == null)
      return null;

    var tmp380 = new THashSet<global::ThriftTest.Insanity>(source.Count);
    foreach (var elem in source)
      tmp380.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp380;
  }


  public static bool Equals(this THashSet<int> instance, object that)
  {
    if (!(that is THashSet<int> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this THashSet<int> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static THashSet<int> DeepCopy(this THashSet<int> source)
  {
    if (source == null)
      return null;

    var tmp381 = new THashSet<int>(source.Count);
    foreach (var elem in source)
      tmp381.Add(elem);
    return tmp381;
  }


  public static bool Equals(this THashSet<string> instance, object that)
  {
    if (!(that is THashSet<string> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this THashSet<string> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static THashSet<string> DeepCopy(this THashSet<string> source)
  {
    if (source == null)
      return null;

    var tmp382 = new THashSet<string>(source.Count);
    foreach (var elem in source)
      tmp382.Add((elem != null) ? elem : null);
    return tmp382;
  }


}
}
