// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'authenticate_telegram.data.gql.dart';

// **************************************************************************
// BuiltValueGenerator
// **************************************************************************

Serializer<GAuthenticateTelegramData> _$gAuthenticateTelegramDataSerializer =
    _$GAuthenticateTelegramDataSerializer();
Serializer<GAuthenticateTelegramData_authenticateTelegram>
_$gAuthenticateTelegramDataAuthenticateTelegramSerializer =
    _$GAuthenticateTelegramData_authenticateTelegramSerializer();
Serializer<GAuthenticateTelegramData_authenticateTelegram_user>
_$gAuthenticateTelegramDataAuthenticateTelegramUserSerializer =
    _$GAuthenticateTelegramData_authenticateTelegram_userSerializer();

class _$GAuthenticateTelegramDataSerializer
    implements StructuredSerializer<GAuthenticateTelegramData> {
  @override
  final Iterable<Type> types = const [
    GAuthenticateTelegramData,
    _$GAuthenticateTelegramData,
  ];
  @override
  final String wireName = 'GAuthenticateTelegramData';

  @override
  Iterable<Object?> serialize(
    Serializers serializers,
    GAuthenticateTelegramData object, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = <Object?>[
      '__typename',
      serializers.serialize(
        object.G__typename,
        specifiedType: const FullType(String),
      ),
      'authenticateTelegram',
      serializers.serialize(
        object.authenticateTelegram,
        specifiedType: const FullType(
          GAuthenticateTelegramData_authenticateTelegram,
        ),
      ),
    ];

    return result;
  }

  @override
  GAuthenticateTelegramData deserialize(
    Serializers serializers,
    Iterable<Object?> serialized, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = GAuthenticateTelegramDataBuilder();

    final iterator = serialized.iterator;
    while (iterator.moveNext()) {
      final key = iterator.current! as String;
      iterator.moveNext();
      final Object? value = iterator.current;
      switch (key) {
        case '__typename':
          result.G__typename =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )!
                  as String;
          break;
        case 'authenticateTelegram':
          result.authenticateTelegram.replace(
            serializers.deserialize(
                  value,
                  specifiedType: const FullType(
                    GAuthenticateTelegramData_authenticateTelegram,
                  ),
                )!
                as GAuthenticateTelegramData_authenticateTelegram,
          );
          break;
      }
    }

    return result.build();
  }
}

class _$GAuthenticateTelegramData_authenticateTelegramSerializer
    implements
        StructuredSerializer<GAuthenticateTelegramData_authenticateTelegram> {
  @override
  final Iterable<Type> types = const [
    GAuthenticateTelegramData_authenticateTelegram,
    _$GAuthenticateTelegramData_authenticateTelegram,
  ];
  @override
  final String wireName = 'GAuthenticateTelegramData_authenticateTelegram';

  @override
  Iterable<Object?> serialize(
    Serializers serializers,
    GAuthenticateTelegramData_authenticateTelegram object, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = <Object?>[
      '__typename',
      serializers.serialize(
        object.G__typename,
        specifiedType: const FullType(String),
      ),
      'user',
      serializers.serialize(
        object.user,
        specifiedType: const FullType(
          GAuthenticateTelegramData_authenticateTelegram_user,
        ),
      ),
    ];

    return result;
  }

  @override
  GAuthenticateTelegramData_authenticateTelegram deserialize(
    Serializers serializers,
    Iterable<Object?> serialized, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = GAuthenticateTelegramData_authenticateTelegramBuilder();

    final iterator = serialized.iterator;
    while (iterator.moveNext()) {
      final key = iterator.current! as String;
      iterator.moveNext();
      final Object? value = iterator.current;
      switch (key) {
        case '__typename':
          result.G__typename =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )!
                  as String;
          break;
        case 'user':
          result.user.replace(
            serializers.deserialize(
                  value,
                  specifiedType: const FullType(
                    GAuthenticateTelegramData_authenticateTelegram_user,
                  ),
                )!
                as GAuthenticateTelegramData_authenticateTelegram_user,
          );
          break;
      }
    }

    return result.build();
  }
}

class _$GAuthenticateTelegramData_authenticateTelegram_userSerializer
    implements
        StructuredSerializer<
          GAuthenticateTelegramData_authenticateTelegram_user
        > {
  @override
  final Iterable<Type> types = const [
    GAuthenticateTelegramData_authenticateTelegram_user,
    _$GAuthenticateTelegramData_authenticateTelegram_user,
  ];
  @override
  final String wireName = 'GAuthenticateTelegramData_authenticateTelegram_user';

  @override
  Iterable<Object?> serialize(
    Serializers serializers,
    GAuthenticateTelegramData_authenticateTelegram_user object, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = <Object?>[
      '__typename',
      serializers.serialize(
        object.G__typename,
        specifiedType: const FullType(String),
      ),
      'id',
      serializers.serialize(object.id, specifiedType: const FullType(String)),
      'telegramId',
      serializers.serialize(
        object.telegramId,
        specifiedType: const FullType(String),
      ),
      'isAdmin',
      serializers.serialize(
        object.isAdmin,
        specifiedType: const FullType(bool),
      ),
    ];
    Object? value;
    value = object.username;
    if (value != null) {
      result
        ..add('username')
        ..add(
          serializers.serialize(value, specifiedType: const FullType(String)),
        );
    }
    value = object.firstName;
    if (value != null) {
      result
        ..add('firstName')
        ..add(
          serializers.serialize(value, specifiedType: const FullType(String)),
        );
    }
    value = object.lastName;
    if (value != null) {
      result
        ..add('lastName')
        ..add(
          serializers.serialize(value, specifiedType: const FullType(String)),
        );
    }
    value = object.photoUrl;
    if (value != null) {
      result
        ..add('photoUrl')
        ..add(
          serializers.serialize(value, specifiedType: const FullType(String)),
        );
    }
    value = object.languageCode;
    if (value != null) {
      result
        ..add('languageCode')
        ..add(
          serializers.serialize(value, specifiedType: const FullType(String)),
        );
    }
    return result;
  }

  @override
  GAuthenticateTelegramData_authenticateTelegram_user deserialize(
    Serializers serializers,
    Iterable<Object?> serialized, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = GAuthenticateTelegramData_authenticateTelegram_userBuilder();

    final iterator = serialized.iterator;
    while (iterator.moveNext()) {
      final key = iterator.current! as String;
      iterator.moveNext();
      final Object? value = iterator.current;
      switch (key) {
        case '__typename':
          result.G__typename =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )!
                  as String;
          break;
        case 'id':
          result.id =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )!
                  as String;
          break;
        case 'telegramId':
          result.telegramId =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )!
                  as String;
          break;
        case 'username':
          result.username =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )
                  as String?;
          break;
        case 'firstName':
          result.firstName =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )
                  as String?;
          break;
        case 'lastName':
          result.lastName =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )
                  as String?;
          break;
        case 'photoUrl':
          result.photoUrl =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )
                  as String?;
          break;
        case 'languageCode':
          result.languageCode =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(String),
                  )
                  as String?;
          break;
        case 'isAdmin':
          result.isAdmin =
              serializers.deserialize(
                    value,
                    specifiedType: const FullType(bool),
                  )!
                  as bool;
          break;
      }
    }

    return result.build();
  }
}

class _$GAuthenticateTelegramData extends GAuthenticateTelegramData {
  @override
  final String G__typename;
  @override
  final GAuthenticateTelegramData_authenticateTelegram authenticateTelegram;

  factory _$GAuthenticateTelegramData([
    void Function(GAuthenticateTelegramDataBuilder)? updates,
  ]) => (GAuthenticateTelegramDataBuilder()..update(updates))._build();

  _$GAuthenticateTelegramData._({
    required this.G__typename,
    required this.authenticateTelegram,
  }) : super._();
  @override
  GAuthenticateTelegramData rebuild(
    void Function(GAuthenticateTelegramDataBuilder) updates,
  ) => (toBuilder()..update(updates)).build();

  @override
  GAuthenticateTelegramDataBuilder toBuilder() =>
      GAuthenticateTelegramDataBuilder()..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is GAuthenticateTelegramData &&
        G__typename == other.G__typename &&
        authenticateTelegram == other.authenticateTelegram;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, G__typename.hashCode);
    _$hash = $jc(_$hash, authenticateTelegram.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(r'GAuthenticateTelegramData')
          ..add('G__typename', G__typename)
          ..add('authenticateTelegram', authenticateTelegram))
        .toString();
  }
}

class GAuthenticateTelegramDataBuilder
    implements
        Builder<GAuthenticateTelegramData, GAuthenticateTelegramDataBuilder> {
  _$GAuthenticateTelegramData? _$v;

  String? _G__typename;
  String? get G__typename => _$this._G__typename;
  set G__typename(String? G__typename) => _$this._G__typename = G__typename;

  GAuthenticateTelegramData_authenticateTelegramBuilder? _authenticateTelegram;
  GAuthenticateTelegramData_authenticateTelegramBuilder
  get authenticateTelegram => _$this._authenticateTelegram ??=
      GAuthenticateTelegramData_authenticateTelegramBuilder();
  set authenticateTelegram(
    GAuthenticateTelegramData_authenticateTelegramBuilder? authenticateTelegram,
  ) => _$this._authenticateTelegram = authenticateTelegram;

  GAuthenticateTelegramDataBuilder() {
    GAuthenticateTelegramData._initializeBuilder(this);
  }

  GAuthenticateTelegramDataBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _G__typename = $v.G__typename;
      _authenticateTelegram = $v.authenticateTelegram.toBuilder();
      _$v = null;
    }
    return this;
  }

  @override
  void replace(GAuthenticateTelegramData other) {
    _$v = other as _$GAuthenticateTelegramData;
  }

  @override
  void update(void Function(GAuthenticateTelegramDataBuilder)? updates) {
    if (updates != null) updates(this);
  }

  @override
  GAuthenticateTelegramData build() => _build();

  _$GAuthenticateTelegramData _build() {
    _$GAuthenticateTelegramData _$result;
    try {
      _$result =
          _$v ??
          _$GAuthenticateTelegramData._(
            G__typename: BuiltValueNullFieldError.checkNotNull(
              G__typename,
              r'GAuthenticateTelegramData',
              'G__typename',
            ),
            authenticateTelegram: authenticateTelegram.build(),
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'authenticateTelegram';
        authenticateTelegram.build();
      } catch (e) {
        throw BuiltValueNestedFieldError(
          r'GAuthenticateTelegramData',
          _$failedField,
          e.toString(),
        );
      }
      rethrow;
    }
    replace(_$result);
    return _$result;
  }
}

class _$GAuthenticateTelegramData_authenticateTelegram
    extends GAuthenticateTelegramData_authenticateTelegram {
  @override
  final String G__typename;
  @override
  final GAuthenticateTelegramData_authenticateTelegram_user user;

  factory _$GAuthenticateTelegramData_authenticateTelegram([
    void Function(GAuthenticateTelegramData_authenticateTelegramBuilder)?
    updates,
  ]) =>
      (GAuthenticateTelegramData_authenticateTelegramBuilder()..update(updates))
          ._build();

  _$GAuthenticateTelegramData_authenticateTelegram._({
    required this.G__typename,
    required this.user,
  }) : super._();
  @override
  GAuthenticateTelegramData_authenticateTelegram rebuild(
    void Function(GAuthenticateTelegramData_authenticateTelegramBuilder)
    updates,
  ) => (toBuilder()..update(updates)).build();

  @override
  GAuthenticateTelegramData_authenticateTelegramBuilder toBuilder() =>
      GAuthenticateTelegramData_authenticateTelegramBuilder()..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is GAuthenticateTelegramData_authenticateTelegram &&
        G__typename == other.G__typename &&
        user == other.user;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, G__typename.hashCode);
    _$hash = $jc(_$hash, user.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(
            r'GAuthenticateTelegramData_authenticateTelegram',
          )
          ..add('G__typename', G__typename)
          ..add('user', user))
        .toString();
  }
}

class GAuthenticateTelegramData_authenticateTelegramBuilder
    implements
        Builder<
          GAuthenticateTelegramData_authenticateTelegram,
          GAuthenticateTelegramData_authenticateTelegramBuilder
        > {
  _$GAuthenticateTelegramData_authenticateTelegram? _$v;

  String? _G__typename;
  String? get G__typename => _$this._G__typename;
  set G__typename(String? G__typename) => _$this._G__typename = G__typename;

  GAuthenticateTelegramData_authenticateTelegram_userBuilder? _user;
  GAuthenticateTelegramData_authenticateTelegram_userBuilder get user =>
      _$this._user ??=
          GAuthenticateTelegramData_authenticateTelegram_userBuilder();
  set user(GAuthenticateTelegramData_authenticateTelegram_userBuilder? user) =>
      _$this._user = user;

  GAuthenticateTelegramData_authenticateTelegramBuilder() {
    GAuthenticateTelegramData_authenticateTelegram._initializeBuilder(this);
  }

  GAuthenticateTelegramData_authenticateTelegramBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _G__typename = $v.G__typename;
      _user = $v.user.toBuilder();
      _$v = null;
    }
    return this;
  }

  @override
  void replace(GAuthenticateTelegramData_authenticateTelegram other) {
    _$v = other as _$GAuthenticateTelegramData_authenticateTelegram;
  }

  @override
  void update(
    void Function(GAuthenticateTelegramData_authenticateTelegramBuilder)?
    updates,
  ) {
    if (updates != null) updates(this);
  }

  @override
  GAuthenticateTelegramData_authenticateTelegram build() => _build();

  _$GAuthenticateTelegramData_authenticateTelegram _build() {
    _$GAuthenticateTelegramData_authenticateTelegram _$result;
    try {
      _$result =
          _$v ??
          _$GAuthenticateTelegramData_authenticateTelegram._(
            G__typename: BuiltValueNullFieldError.checkNotNull(
              G__typename,
              r'GAuthenticateTelegramData_authenticateTelegram',
              'G__typename',
            ),
            user: user.build(),
          );
    } catch (_) {
      late String _$failedField;
      try {
        _$failedField = 'user';
        user.build();
      } catch (e) {
        throw BuiltValueNestedFieldError(
          r'GAuthenticateTelegramData_authenticateTelegram',
          _$failedField,
          e.toString(),
        );
      }
      rethrow;
    }
    replace(_$result);
    return _$result;
  }
}

class _$GAuthenticateTelegramData_authenticateTelegram_user
    extends GAuthenticateTelegramData_authenticateTelegram_user {
  @override
  final String G__typename;
  @override
  final String id;
  @override
  final String telegramId;
  @override
  final String? username;
  @override
  final String? firstName;
  @override
  final String? lastName;
  @override
  final String? photoUrl;
  @override
  final String? languageCode;
  @override
  final bool isAdmin;

  factory _$GAuthenticateTelegramData_authenticateTelegram_user([
    void Function(GAuthenticateTelegramData_authenticateTelegram_userBuilder)?
    updates,
  ]) =>
      (GAuthenticateTelegramData_authenticateTelegram_userBuilder()
            ..update(updates))
          ._build();

  _$GAuthenticateTelegramData_authenticateTelegram_user._({
    required this.G__typename,
    required this.id,
    required this.telegramId,
    this.username,
    this.firstName,
    this.lastName,
    this.photoUrl,
    this.languageCode,
    required this.isAdmin,
  }) : super._();
  @override
  GAuthenticateTelegramData_authenticateTelegram_user rebuild(
    void Function(GAuthenticateTelegramData_authenticateTelegram_userBuilder)
    updates,
  ) => (toBuilder()..update(updates)).build();

  @override
  GAuthenticateTelegramData_authenticateTelegram_userBuilder toBuilder() =>
      GAuthenticateTelegramData_authenticateTelegram_userBuilder()
        ..replace(this);

  @override
  bool operator ==(Object other) {
    if (identical(other, this)) return true;
    return other is GAuthenticateTelegramData_authenticateTelegram_user &&
        G__typename == other.G__typename &&
        id == other.id &&
        telegramId == other.telegramId &&
        username == other.username &&
        firstName == other.firstName &&
        lastName == other.lastName &&
        photoUrl == other.photoUrl &&
        languageCode == other.languageCode &&
        isAdmin == other.isAdmin;
  }

  @override
  int get hashCode {
    var _$hash = 0;
    _$hash = $jc(_$hash, G__typename.hashCode);
    _$hash = $jc(_$hash, id.hashCode);
    _$hash = $jc(_$hash, telegramId.hashCode);
    _$hash = $jc(_$hash, username.hashCode);
    _$hash = $jc(_$hash, firstName.hashCode);
    _$hash = $jc(_$hash, lastName.hashCode);
    _$hash = $jc(_$hash, photoUrl.hashCode);
    _$hash = $jc(_$hash, languageCode.hashCode);
    _$hash = $jc(_$hash, isAdmin.hashCode);
    _$hash = $jf(_$hash);
    return _$hash;
  }

  @override
  String toString() {
    return (newBuiltValueToStringHelper(
            r'GAuthenticateTelegramData_authenticateTelegram_user',
          )
          ..add('G__typename', G__typename)
          ..add('id', id)
          ..add('telegramId', telegramId)
          ..add('username', username)
          ..add('firstName', firstName)
          ..add('lastName', lastName)
          ..add('photoUrl', photoUrl)
          ..add('languageCode', languageCode)
          ..add('isAdmin', isAdmin))
        .toString();
  }
}

class GAuthenticateTelegramData_authenticateTelegram_userBuilder
    implements
        Builder<
          GAuthenticateTelegramData_authenticateTelegram_user,
          GAuthenticateTelegramData_authenticateTelegram_userBuilder
        > {
  _$GAuthenticateTelegramData_authenticateTelegram_user? _$v;

  String? _G__typename;
  String? get G__typename => _$this._G__typename;
  set G__typename(String? G__typename) => _$this._G__typename = G__typename;

  String? _id;
  String? get id => _$this._id;
  set id(String? id) => _$this._id = id;

  String? _telegramId;
  String? get telegramId => _$this._telegramId;
  set telegramId(String? telegramId) => _$this._telegramId = telegramId;

  String? _username;
  String? get username => _$this._username;
  set username(String? username) => _$this._username = username;

  String? _firstName;
  String? get firstName => _$this._firstName;
  set firstName(String? firstName) => _$this._firstName = firstName;

  String? _lastName;
  String? get lastName => _$this._lastName;
  set lastName(String? lastName) => _$this._lastName = lastName;

  String? _photoUrl;
  String? get photoUrl => _$this._photoUrl;
  set photoUrl(String? photoUrl) => _$this._photoUrl = photoUrl;

  String? _languageCode;
  String? get languageCode => _$this._languageCode;
  set languageCode(String? languageCode) => _$this._languageCode = languageCode;

  bool? _isAdmin;
  bool? get isAdmin => _$this._isAdmin;
  set isAdmin(bool? isAdmin) => _$this._isAdmin = isAdmin;

  GAuthenticateTelegramData_authenticateTelegram_userBuilder() {
    GAuthenticateTelegramData_authenticateTelegram_user._initializeBuilder(
      this,
    );
  }

  GAuthenticateTelegramData_authenticateTelegram_userBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _G__typename = $v.G__typename;
      _id = $v.id;
      _telegramId = $v.telegramId;
      _username = $v.username;
      _firstName = $v.firstName;
      _lastName = $v.lastName;
      _photoUrl = $v.photoUrl;
      _languageCode = $v.languageCode;
      _isAdmin = $v.isAdmin;
      _$v = null;
    }
    return this;
  }

  @override
  void replace(GAuthenticateTelegramData_authenticateTelegram_user other) {
    _$v = other as _$GAuthenticateTelegramData_authenticateTelegram_user;
  }

  @override
  void update(
    void Function(GAuthenticateTelegramData_authenticateTelegram_userBuilder)?
    updates,
  ) {
    if (updates != null) updates(this);
  }

  @override
  GAuthenticateTelegramData_authenticateTelegram_user build() => _build();

  _$GAuthenticateTelegramData_authenticateTelegram_user _build() {
    final _$result =
        _$v ??
        _$GAuthenticateTelegramData_authenticateTelegram_user._(
          G__typename: BuiltValueNullFieldError.checkNotNull(
            G__typename,
            r'GAuthenticateTelegramData_authenticateTelegram_user',
            'G__typename',
          ),
          id: BuiltValueNullFieldError.checkNotNull(
            id,
            r'GAuthenticateTelegramData_authenticateTelegram_user',
            'id',
          ),
          telegramId: BuiltValueNullFieldError.checkNotNull(
            telegramId,
            r'GAuthenticateTelegramData_authenticateTelegram_user',
            'telegramId',
          ),
          username: username,
          firstName: firstName,
          lastName: lastName,
          photoUrl: photoUrl,
          languageCode: languageCode,
          isAdmin: BuiltValueNullFieldError.checkNotNull(
            isAdmin,
            r'GAuthenticateTelegramData_authenticateTelegram_user',
            'isAdmin',
          ),
        );
    replace(_$result);
    return _$result;
  }
}

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
