part of 'generated.dart';

class GetTeamMemberByIdVariablesBuilder {
  String id;

  final FirebaseDataConnect _dataConnect;
  GetTeamMemberByIdVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<GetTeamMemberByIdData> dataDeserializer = (dynamic json)  => GetTeamMemberByIdData.fromJson(jsonDecode(json));
  Serializer<GetTeamMemberByIdVariables> varsSerializer = (GetTeamMemberByIdVariables vars) => jsonEncode(vars.toJson());
  Future<QueryResult<GetTeamMemberByIdData, GetTeamMemberByIdVariables>> execute() {
    return ref().execute();
  }

  QueryRef<GetTeamMemberByIdData, GetTeamMemberByIdVariables> ref() {
    GetTeamMemberByIdVariables vars= GetTeamMemberByIdVariables(id: id,);
    return _dataConnect.query("getTeamMemberById", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class GetTeamMemberByIdTeamMember {
  final String id;
  final String teamId;
  final EnumValue<TeamMemberRole> role;
  final String? title;
  final String? department;
  final String? teamHubId;
  final bool? isActive;
  final Timestamp? createdAt;
  final GetTeamMemberByIdTeamMemberUser user;
  final GetTeamMemberByIdTeamMemberTeamHub? teamHub;
  GetTeamMemberByIdTeamMember.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamId = nativeFromJson<String>(json['teamId']),
  role = teamMemberRoleDeserializer(json['role']),
  title = json['title'] == null ? null : nativeFromJson<String>(json['title']),
  department = json['department'] == null ? null : nativeFromJson<String>(json['department']),
  teamHubId = json['teamHubId'] == null ? null : nativeFromJson<String>(json['teamHubId']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  user = GetTeamMemberByIdTeamMemberUser.fromJson(json['user']),
  teamHub = json['teamHub'] == null ? null : GetTeamMemberByIdTeamMemberTeamHub.fromJson(json['teamHub']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMemberByIdTeamMember otherTyped = other as GetTeamMemberByIdTeamMember;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    role == otherTyped.role && 
    title == otherTyped.title && 
    department == otherTyped.department && 
    teamHubId == otherTyped.teamHubId && 
    isActive == otherTyped.isActive && 
    createdAt == otherTyped.createdAt && 
    user == otherTyped.user && 
    teamHub == otherTyped.teamHub;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['teamId'] = nativeToJson<String>(teamId);
    json['role'] = 
    teamMemberRoleSerializer(role)
    ;
    if (title != null) {
      json['title'] = nativeToJson<String?>(title);
    }
    if (department != null) {
      json['department'] = nativeToJson<String?>(department);
    }
    if (teamHubId != null) {
      json['teamHubId'] = nativeToJson<String?>(teamHubId);
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['user'] = user.toJson();
    if (teamHub != null) {
      json['teamHub'] = teamHub!.toJson();
    }
    return json;
  }

  GetTeamMemberByIdTeamMember({
    required this.id,
    required this.teamId,
    required this.role,
    this.title,
    this.department,
    this.teamHubId,
    this.isActive,
    this.createdAt,
    required this.user,
    this.teamHub,
  });
}

@immutable
class GetTeamMemberByIdTeamMemberUser {
  final String? fullName;
  final String? email;
  GetTeamMemberByIdTeamMemberUser.fromJson(dynamic json):
  
  fullName = json['fullName'] == null ? null : nativeFromJson<String>(json['fullName']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMemberByIdTeamMemberUser otherTyped = other as GetTeamMemberByIdTeamMemberUser;
    return fullName == otherTyped.fullName && 
    email == otherTyped.email;
    
  }
  @override
  int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (fullName != null) {
      json['fullName'] = nativeToJson<String?>(fullName);
    }
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    return json;
  }

  GetTeamMemberByIdTeamMemberUser({
    this.fullName,
    this.email,
  });
}

@immutable
class GetTeamMemberByIdTeamMemberTeamHub {
  final String hubName;
  GetTeamMemberByIdTeamMemberTeamHub.fromJson(dynamic json):
  
  hubName = nativeFromJson<String>(json['hubName']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMemberByIdTeamMemberTeamHub otherTyped = other as GetTeamMemberByIdTeamMemberTeamHub;
    return hubName == otherTyped.hubName;
    
  }
  @override
  int get hashCode => hubName.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['hubName'] = nativeToJson<String>(hubName);
    return json;
  }

  GetTeamMemberByIdTeamMemberTeamHub({
    required this.hubName,
  });
}

@immutable
class GetTeamMemberByIdData {
  final GetTeamMemberByIdTeamMember? teamMember;
  GetTeamMemberByIdData.fromJson(dynamic json):
  
  teamMember = json['teamMember'] == null ? null : GetTeamMemberByIdTeamMember.fromJson(json['teamMember']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMemberByIdData otherTyped = other as GetTeamMemberByIdData;
    return teamMember == otherTyped.teamMember;
    
  }
  @override
  int get hashCode => teamMember.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (teamMember != null) {
      json['teamMember'] = teamMember!.toJson();
    }
    return json;
  }

  GetTeamMemberByIdData({
    this.teamMember,
  });
}

@immutable
class GetTeamMemberByIdVariables {
  final String id;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  GetTeamMemberByIdVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final GetTeamMemberByIdVariables otherTyped = other as GetTeamMemberByIdVariables;
    return id == otherTyped.id;
    
  }
  @override
  int get hashCode => id.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    return json;
  }

  GetTeamMemberByIdVariables({
    required this.id,
  });
}

