validate_access_token_response_dto.dart 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //
  2. // AUTO-GENERATED FILE, DO NOT MODIFY!
  3. //
  4. // @dart=2.12
  5. // ignore_for_file: unused_element, unused_import
  6. // ignore_for_file: always_put_required_named_parameters_first
  7. // ignore_for_file: constant_identifier_names
  8. // ignore_for_file: lines_longer_than_80_chars
  9. part of openapi.api;
  10. class ValidateAccessTokenResponseDto {
  11. /// Returns a new [ValidateAccessTokenResponseDto] instance.
  12. ValidateAccessTokenResponseDto({
  13. required this.authStatus,
  14. });
  15. bool authStatus;
  16. @override
  17. bool operator ==(Object other) => identical(this, other) || other is ValidateAccessTokenResponseDto &&
  18. other.authStatus == authStatus;
  19. @override
  20. int get hashCode =>
  21. // ignore: unnecessary_parenthesis
  22. (authStatus.hashCode);
  23. @override
  24. String toString() => 'ValidateAccessTokenResponseDto[authStatus=$authStatus]';
  25. Map<String, dynamic> toJson() {
  26. final json = <String, dynamic>{};
  27. json[r'authStatus'] = this.authStatus;
  28. return json;
  29. }
  30. /// Returns a new [ValidateAccessTokenResponseDto] instance and imports its values from
  31. /// [value] if it's a [Map], null otherwise.
  32. // ignore: prefer_constructors_over_static_methods
  33. static ValidateAccessTokenResponseDto? fromJson(dynamic value) {
  34. if (value is Map) {
  35. final json = value.cast<String, dynamic>();
  36. return ValidateAccessTokenResponseDto(
  37. authStatus: mapValueOfType<bool>(json, r'authStatus')!,
  38. );
  39. }
  40. return null;
  41. }
  42. static List<ValidateAccessTokenResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
  43. final result = <ValidateAccessTokenResponseDto>[];
  44. if (json is List && json.isNotEmpty) {
  45. for (final row in json) {
  46. final value = ValidateAccessTokenResponseDto.fromJson(row);
  47. if (value != null) {
  48. result.add(value);
  49. }
  50. }
  51. }
  52. return result.toList(growable: growable);
  53. }
  54. static Map<String, ValidateAccessTokenResponseDto> mapFromJson(dynamic json) {
  55. final map = <String, ValidateAccessTokenResponseDto>{};
  56. if (json is Map && json.isNotEmpty) {
  57. json = json.cast<String, dynamic>(); // ignore: parameter_assignments
  58. for (final entry in json.entries) {
  59. final value = ValidateAccessTokenResponseDto.fromJson(entry.value);
  60. if (value != null) {
  61. map[entry.key] = value;
  62. }
  63. }
  64. }
  65. return map;
  66. }
  67. // maps a json object with a list of ValidateAccessTokenResponseDto-objects as value to a dart map
  68. static Map<String, List<ValidateAccessTokenResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
  69. final map = <String, List<ValidateAccessTokenResponseDto>>{};
  70. if (json is Map && json.isNotEmpty) {
  71. // ignore: parameter_assignments
  72. json = json.cast<String, dynamic>();
  73. for (final entry in json.entries) {
  74. map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,);
  75. }
  76. }
  77. return map;
  78. }
  79. /// The list of required keys that must be present in a JSON.
  80. static const requiredKeys = <String>{
  81. 'authStatus',
  82. };
  83. }