part of 'generated.dart';

class UpdateTeamHubVariablesBuilder {
  String id;
  Optional<String> _teamId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _hubName = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _address = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
  Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
  Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson);
  Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
  Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);

  final FirebaseDataConnect _dataConnect;  UpdateTeamHubVariablesBuilder teamId(String? t) {
   _teamId.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder hubName(String? t) {
   _hubName.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder address(String? t) {
   _address.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder placeId(String? t) {
   _placeId.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder latitude(double? t) {
   _latitude.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder longitude(double? t) {
   _longitude.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder city(String? t) {
   _city.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder state(String? t) {
   _state.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder street(String? t) {
   _street.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder country(String? t) {
   _country.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder zipCode(String? t) {
   _zipCode.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder managerName(String? t) {
   _managerName.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder isActive(bool? t) {
   _isActive.value = t;
   return this;
  }
  UpdateTeamHubVariablesBuilder departments(AnyValue? t) {
   _departments.value = t;
   return this;
  }

  UpdateTeamHubVariablesBuilder(this._dataConnect, {required  this.id,});
  Deserializer<UpdateTeamHubData> dataDeserializer = (dynamic json)  => UpdateTeamHubData.fromJson(jsonDecode(json));
  Serializer<UpdateTeamHubVariables> varsSerializer = (UpdateTeamHubVariables vars) => jsonEncode(vars.toJson());
  Future<OperationResult<UpdateTeamHubData, UpdateTeamHubVariables>> execute() {
    return ref().execute();
  }

  MutationRef<UpdateTeamHubData, UpdateTeamHubVariables> ref() {
    UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,teamId: _teamId,hubName: _hubName,address: _address,placeId: _placeId,latitude: _latitude,longitude: _longitude,city: _city,state: _state,street: _street,country: _country,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
    return _dataConnect.mutation("updateTeamHub", dataDeserializer, varsSerializer, vars);
  }
}

@immutable
class UpdateTeamHubTeamHubUpdate {
  final String id;
  UpdateTeamHubTeamHubUpdate.fromJson(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 UpdateTeamHubTeamHubUpdate otherTyped = other as UpdateTeamHubTeamHubUpdate;
    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;
  }

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

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

    final UpdateTeamHubData otherTyped = other as UpdateTeamHubData;
    return teamHub_update == otherTyped.teamHub_update;
    
  }
  @override
  int get hashCode => teamHub_update.hashCode;
  

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

  UpdateTeamHubData({
    this.teamHub_update,
  });
}

@immutable
class UpdateTeamHubVariables {
  final String id;
  late final Optional<String>teamId;
  late final Optional<String>hubName;
  late final Optional<String>address;
  late final Optional<String>placeId;
  late final Optional<double>latitude;
  late final Optional<double>longitude;
  late final Optional<String>city;
  late final Optional<String>state;
  late final Optional<String>street;
  late final Optional<String>country;
  late final Optional<String>zipCode;
  late final Optional<String>managerName;
  late final Optional<bool>isActive;
  late final Optional<AnyValue>departments;
  @Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
  UpdateTeamHubVariables.fromJson(Map<String, dynamic> json):
  
  id = nativeFromJson<String>(json['id']) {
  
  
  
    teamId = Optional.optional(nativeFromJson, nativeToJson);
    teamId.value = json['teamId'] == null ? null : nativeFromJson<String>(json['teamId']);
  
  
    hubName = Optional.optional(nativeFromJson, nativeToJson);
    hubName.value = json['hubName'] == null ? null : nativeFromJson<String>(json['hubName']);
  
  
    address = Optional.optional(nativeFromJson, nativeToJson);
    address.value = json['address'] == null ? null : nativeFromJson<String>(json['address']);
  
  
    placeId = Optional.optional(nativeFromJson, nativeToJson);
    placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
  
  
    latitude = Optional.optional(nativeFromJson, nativeToJson);
    latitude.value = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']);
  
  
    longitude = Optional.optional(nativeFromJson, nativeToJson);
    longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
  
  
    city = Optional.optional(nativeFromJson, nativeToJson);
    city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
  
  
    state = Optional.optional(nativeFromJson, nativeToJson);
    state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
  
  
    street = Optional.optional(nativeFromJson, nativeToJson);
    street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
  
  
    country = Optional.optional(nativeFromJson, nativeToJson);
    country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
  
  
    zipCode = Optional.optional(nativeFromJson, nativeToJson);
    zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
  
  
    managerName = Optional.optional(nativeFromJson, nativeToJson);
    managerName.value = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']);
  
  
    isActive = Optional.optional(nativeFromJson, nativeToJson);
    isActive.value = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']);
  
  
    departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
    departments.value = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
  
  }
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    hubName == otherTyped.hubName && 
    address == otherTyped.address && 
    placeId == otherTyped.placeId && 
    latitude == otherTyped.latitude && 
    longitude == otherTyped.longitude && 
    city == otherTyped.city && 
    state == otherTyped.state && 
    street == otherTyped.street && 
    country == otherTyped.country && 
    zipCode == otherTyped.zipCode && 
    managerName == otherTyped.managerName && 
    isActive == otherTyped.isActive && 
    departments == otherTyped.departments;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    if(teamId.state == OptionalState.set) {
      json['teamId'] = teamId.toJson();
    }
    if(hubName.state == OptionalState.set) {
      json['hubName'] = hubName.toJson();
    }
    if(address.state == OptionalState.set) {
      json['address'] = address.toJson();
    }
    if(placeId.state == OptionalState.set) {
      json['placeId'] = placeId.toJson();
    }
    if(latitude.state == OptionalState.set) {
      json['latitude'] = latitude.toJson();
    }
    if(longitude.state == OptionalState.set) {
      json['longitude'] = longitude.toJson();
    }
    if(city.state == OptionalState.set) {
      json['city'] = city.toJson();
    }
    if(state.state == OptionalState.set) {
      json['state'] = state.toJson();
    }
    if(street.state == OptionalState.set) {
      json['street'] = street.toJson();
    }
    if(country.state == OptionalState.set) {
      json['country'] = country.toJson();
    }
    if(zipCode.state == OptionalState.set) {
      json['zipCode'] = zipCode.toJson();
    }
    if(managerName.state == OptionalState.set) {
      json['managerName'] = managerName.toJson();
    }
    if(isActive.state == OptionalState.set) {
      json['isActive'] = isActive.toJson();
    }
    if(departments.state == OptionalState.set) {
      json['departments'] = departments.toJson();
    }
    return json;
  }

  UpdateTeamHubVariables({
    required this.id,
    required this.teamId,
    required this.hubName,
    required this.address,
    required this.placeId,
    required this.latitude,
    required this.longitude,
    required this.city,
    required this.state,
    required this.street,
    required this.country,
    required this.zipCode,
    required this.managerName,
    required this.isActive,
    required this.departments,
  });
}

