๐Ÿ“ฆ techouse / alfred_workflow

๐Ÿ“„ alfred_user_configuration_select.g.dart ยท 137 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'alfred_user_configuration_select.dart';

// **************************************************************************
// CopyWithGenerator
// **************************************************************************

abstract class _$AlfredUserConfigurationSelectCWProxy {
  AlfredUserConfigurationSelect type(AlfredUserConfigurationType type);

  AlfredUserConfigurationSelect variable(String variable);

  AlfredUserConfigurationSelect config(
    AlfredUserConfigurationConfigSelect config,
  );

  AlfredUserConfigurationSelect description(String? description);

  AlfredUserConfigurationSelect label(String? label);

  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `AlfredUserConfigurationSelect(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// AlfredUserConfigurationSelect(...).copyWith(id: 12, name: "My name")
  /// ```
  AlfredUserConfigurationSelect call({
    AlfredUserConfigurationType type,
    String variable,
    AlfredUserConfigurationConfigSelect config,
    String? description,
    String? label,
  });
}

/// Callable proxy for `copyWith` functionality.
/// Use as `instanceOfAlfredUserConfigurationSelect.copyWith(...)` or call `instanceOfAlfredUserConfigurationSelect.copyWith.fieldName(value)` for a single field.
class _$AlfredUserConfigurationSelectCWProxyImpl
    implements _$AlfredUserConfigurationSelectCWProxy {
  const _$AlfredUserConfigurationSelectCWProxyImpl(this._value);

  final AlfredUserConfigurationSelect _value;

  @override
  AlfredUserConfigurationSelect type(AlfredUserConfigurationType type) =>
      call(type: type);

  @override
  AlfredUserConfigurationSelect variable(String variable) =>
      call(variable: variable);

  @override
  AlfredUserConfigurationSelect config(
    AlfredUserConfigurationConfigSelect config,
  ) => call(config: config);

  @override
  AlfredUserConfigurationSelect description(String? description) =>
      call(description: description);

  @override
  AlfredUserConfigurationSelect label(String? label) => call(label: label);

  @override
  /// Creates a new instance with the provided field values.
  /// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `AlfredUserConfigurationSelect(...).copyWith.fieldName(value)`.
  ///
  /// Example:
  /// ```dart
  /// AlfredUserConfigurationSelect(...).copyWith(id: 12, name: "My name")
  /// ```
  AlfredUserConfigurationSelect call({
    Object? type = const $CopyWithPlaceholder(),
    Object? variable = const $CopyWithPlaceholder(),
    Object? config = const $CopyWithPlaceholder(),
    Object? description = const $CopyWithPlaceholder(),
    Object? label = const $CopyWithPlaceholder(),
  }) {
    return AlfredUserConfigurationSelect(
      type: type == const $CopyWithPlaceholder() || type == null
          ? _value.type
          // ignore: cast_nullable_to_non_nullable
          : type as AlfredUserConfigurationType,
      variable: variable == const $CopyWithPlaceholder() || variable == null
          ? _value.variable
          // ignore: cast_nullable_to_non_nullable
          : variable as String,
      config: config == const $CopyWithPlaceholder() || config == null
          ? _value.config
          // ignore: cast_nullable_to_non_nullable
          : config as AlfredUserConfigurationConfigSelect,
      description: description == const $CopyWithPlaceholder()
          ? _value.description
          // ignore: cast_nullable_to_non_nullable
          : description as String?,
      label: label == const $CopyWithPlaceholder()
          ? _value.label
          // ignore: cast_nullable_to_non_nullable
          : label as String?,
    );
  }
}

extension $AlfredUserConfigurationSelectCopyWith
    on AlfredUserConfigurationSelect {
  /// Returns a callable class used to build a new instance with modified fields.
  /// Example: `instanceOfAlfredUserConfigurationSelect.copyWith(...)` or `instanceOfAlfredUserConfigurationSelect.copyWith.fieldName(...)`.
  // ignore: library_private_types_in_public_api
  _$AlfredUserConfigurationSelectCWProxy get copyWith =>
      _$AlfredUserConfigurationSelectCWProxyImpl(this);
}

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

AlfredUserConfigurationSelect _$AlfredUserConfigurationSelectFromJson(
  Map<String, dynamic> json,
) => AlfredUserConfigurationSelect(
  type: $enumDecode(_$AlfredUserConfigurationTypeEnumMap, json['type']),
  variable: json['variable'] as String,
  config: AlfredUserConfigurationSelect._configFromJson(json['config'] as Map),
  description: json['description'] as String?,
  label: json['label'] as String?,
);

const _$AlfredUserConfigurationTypeEnumMap = {
  AlfredUserConfigurationType.textField: 'textfield',
  AlfredUserConfigurationType.textArea: 'textarea',
  AlfredUserConfigurationType.checkBox: 'checkbox',
  AlfredUserConfigurationType.select: 'popupbutton',
  AlfredUserConfigurationType.filePicker: 'filepicker',
  AlfredUserConfigurationType.slider: 'slider',
};