/**
 * 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 OptReqDefTest
{
public static class optional_required_defaultExtensions
{
  public static bool Equals(this Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>> instance, object that)
  {
    if (!(that is Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>> other)) return false;
    if (ReferenceEquals(instance, other)) return true;

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>> DeepCopy(this Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>> source)
  {
    if (source == null)
      return null;

    var tmp208 = new Dictionary<global::OptReqDefTest.Distance, List<global::OptReqDefTest.RaceDetails>>(source.Count);
    foreach (var pair in source)
      tmp208.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp208;
  }


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

    return TCollections.Equals(instance, other);
  }


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


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

    var tmp209 = new Dictionary<global::OptReqDefTest.Distance, global::OptReqDefTest.Distance>(source.Count);
    foreach (var pair in source)
      tmp209.Add(pair.Key, pair.Value);
    return tmp209;
  }


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

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>> DeepCopy(this Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>> source)
  {
    if (source == null)
      return null;

    var tmp210 = new Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>>(source.Count);
    foreach (var pair in source)
      tmp210.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
    return tmp210;
  }


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

    return TCollections.Equals(instance, other);
  }


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


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

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


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

    return TCollections.Equals(instance, other);
  }


  public static int GetHashCode(this List<Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>>> instance)
  {
    return TCollections.GetHashCode(instance);
  }


  public static List<Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>>> DeepCopy(this List<Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>>> source)
  {
    if (source == null)
      return null;

    var tmp212 = new List<Dictionary<sbyte, THashSet<global::OptReqDefTest.Distance>>>(source.Count);
    foreach (var elem in source)
      tmp212.Add((elem != null) ? elem.DeepCopy() : null);
    return tmp212;
  }


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

    return TCollections.Equals(instance, other);
  }


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


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

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


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

    return TCollections.Equals(instance, other);
  }


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


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

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


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

    return TCollections.Equals(instance, other);
  }


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


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

    var tmp215 = new List<global::OptReqDefTest.Distance>(source.Count);
    foreach (var elem in source)
      tmp215.Add(elem);
    return tmp215;
  }


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

    return TCollections.Equals(instance, other);
  }


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


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

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


  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 tmp217 = new List<int>(source.Count);
    foreach (var elem in source)
      tmp217.Add(elem);
    return tmp217;
  }


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

    return TCollections.Equals(instance, other);
  }


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


  public static THashSet<List<global::OptReqDefTest.Distance>> DeepCopy(this THashSet<List<global::OptReqDefTest.Distance>> source)
  {
    if (source == null)
      return null;

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


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

    return TCollections.Equals(instance, other);
  }


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


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

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


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

    return TCollections.Equals(instance, other);
  }


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


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

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


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

    return TCollections.Equals(instance, other);
  }


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


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

    var tmp221 = new THashSet<global::OptReqDefTest.Distance>(source.Count);
    foreach (var elem in source)
      tmp221.Add(elem);
    return tmp221;
  }


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

    return TCollections.Equals(instance, other);
  }


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


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

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


}
}
