// GENERATED CODE - DO NOT MODIFY BY HAND

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

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

Serializer<GAuthenticateTelegramVars> _$gAuthenticateTelegramVarsSerializer =
    _$GAuthenticateTelegramVarsSerializer();

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

  @override
  Iterable<Object?> serialize(
    Serializers serializers,
    GAuthenticateTelegramVars object, {
    FullType specifiedType = FullType.unspecified,
  }) {
    final result = <Object?>[
      'input',
      serializers.serialize(
        object.input,
        specifiedType: const FullType(_i1.GAuthenticateTelegramInput),
      ),
    ];

    return result;
  }

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

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

    return result.build();
  }
}

class _$GAuthenticateTelegramVars extends GAuthenticateTelegramVars {
  @override
  final _i1.GAuthenticateTelegramInput input;

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

  _$GAuthenticateTelegramVars._({required this.input}) : super._();
  @override
  GAuthenticateTelegramVars rebuild(
    void Function(GAuthenticateTelegramVarsBuilder) updates,
  ) => (toBuilder()..update(updates)).build();

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

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

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

  @override
  String toString() {
    return (newBuiltValueToStringHelper(
      r'GAuthenticateTelegramVars',
    )..add('input', input)).toString();
  }
}

class GAuthenticateTelegramVarsBuilder
    implements
        Builder<GAuthenticateTelegramVars, GAuthenticateTelegramVarsBuilder> {
  _$GAuthenticateTelegramVars? _$v;

  _i1.GAuthenticateTelegramInputBuilder? _input;
  _i1.GAuthenticateTelegramInputBuilder get input =>
      _$this._input ??= _i1.GAuthenticateTelegramInputBuilder();
  set input(_i1.GAuthenticateTelegramInputBuilder? input) =>
      _$this._input = input;

  GAuthenticateTelegramVarsBuilder();

  GAuthenticateTelegramVarsBuilder get _$this {
    final $v = _$v;
    if ($v != null) {
      _input = $v.input.toBuilder();
      _$v = null;
    }
    return this;
  }

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

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

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

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

// ignore_for_file: deprecated_member_use_from_same_package,type=lint
