content: //
  // AUTO-GENERATED FILE, DO NOT MODIFY!
  //
  // @dart=2.12
  
  // ignore_for_file: require_trailing_commas
  // ignore_for_file: unused_element
  // ignore_for_file: unnecessary_this
  // ignore_for_file: always_put_required_named_parameters_first
  // ignore_for_file: constant_identifier_names
  // ignore_for_file: lines_longer_than_80_chars
  // ignore_for_file: avoid_function_literals_in_foreach_calls
  
  import 'package:kubenav/models/kubernetes/helpers.dart';
  import 'package:kubenav/models/kubernetes/io_k8s_apimachinery_pkg_apis_meta_v1_object_meta.dart';
  
  class IoK8sApiCoreV1Secret {
    /// Returns a new [IoK8sApiCoreV1Secret] instance.
    IoK8sApiCoreV1Secret({
      this.apiVersion,
      this.data = const {},
      this.immutable,
      this.kind,
      this.metadata,
      this.stringData = const {},
      this.type,
    });
  
    /// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    ///
    /// Please note: This property should have been non-nullable! Since the specification file
    /// does not include a default value (using the "default:" property), however, the generated
    /// source code must fall back to having a nullable type.
    /// Consider adding a "default:" property in the specification file to hide this note.
    ///
    String? apiVersion;
  
    /// Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
    Map<String, String> data;
  
    /// Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
    ///
    /// Please note: This property should have been non-nullable! Since the specification file
    /// does not include a default value (using the "default:" property), however, the generated
    /// source code must fall back to having a nullable type.
    /// Consider adding a "default:" property in the specification file to hide this note.
    ///
    bool? immutable;
  
    /// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    ///
    /// Please note: This property should have been non-nullable! Since the specification file
    /// does not include a default value (using the "default:" property), however, the generated
    /// source code must fall back to having a nullable type.
    /// Consider adding a "default:" property in the specification file to hide this note.
    ///
    String? kind;
  
    ///
    /// Please note: This property should have been non-nullable! Since the specification file
    /// does not include a default value (using the "default:" property), however, the generated
    /// source code must fall back to having a nullable type.
    /// Consider adding a "default:" property in the specification file to hide this note.
    ///
    IoK8sApimachineryPkgApisMetaV1ObjectMeta? metadata;
  
    /// stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
    Map<String, String> stringData;
  
    /// Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
    ///
    /// Please note: This property should have been non-nullable! Since the specification file
    /// does not include a default value (using the "default:" property), however, the generated
    /// source code must fall back to having a nullable type.
    /// Consider adding a "default:" property in the specification file to hide this note.
    ///
    String? type;
  
    @override
    bool operator ==(Object other) =>
        identical(this, other) ||
        other is IoK8sApiCoreV1Secret &&
            other.apiVersion == apiVersion &&
            other.data == data &&
            other.immutable == immutable &&
            other.kind == kind &&
            other.metadata == metadata &&
            other.stringData == stringData &&
            other.type == type;
  
    @override
    int get hashCode =>
        // ignore: unnecessary_parenthesis
        (apiVersion == null ? 0 : apiVersion!.hashCode) +
        (data.hashCode) +
        (immutable == null ? 0 : immutable!.hashCode) +
        (kind == null ? 0 : kind!.hashCode) +
        (metadata == null ? 0 : metadata!.hashCode) +
        (stringData.hashCode) +
        (type == null ? 0 : type!.hashCode);
  
    @override
    String toString() =>
        'IoK8sApiCoreV1Secret[apiVersion=$apiVersion, data=$data, immutable=$immutable, kind=$kind, metadata=$metadata, stringData=$stringData, type=$type]';
  
    Map<String, dynamic> toJson() {
      final json = <String, dynamic>{};
      if (this.apiVersion != null) {
        json[r'apiVersion'] = this.apiVersion;
      } else {
        json[r'apiVersion'] = null;
      }
      json[r'data'] = this.data;
      if (this.immutable != null) {
        json[r'immutable'] = this.immutable;
      } else {
        json[r'immutable'] = null;
      }
      if (this.kind != null) {
        json[r'kind'] = this.kind;
      } else {
        json[r'kind'] = null;
      }
      if (this.metadata != null) {
        json[r'metadata'] = this.metadata;
      } else {
        json[r'metadata'] = null;
      }
      json[r'stringData'] = this.stringData;
      if (this.type != null) {
        json[r'type'] = this.type;
      } else {
        json[r'type'] = null;
      }
      return json;
    }
  
    /// Returns a new [IoK8sApiCoreV1Secret] instance and imports its values from
    /// [value] if it's a [Map], null otherwise.
    // ignore: prefer_constructors_over_static_methods
    static IoK8sApiCoreV1Secret? fromJson(dynamic value) {
      if (value is Map) {
        final json = value.cast<String, dynamic>();
  
        // Ensure that the map contains the required keys.
        // Note 1: the values aren't checked for validity beyond being non-null.
        // Note 2: this code is stripped in release mode!
        assert(() {
          requiredKeys.forEach((key) {
            assert(json.containsKey(key),
                'Required key "IoK8sApiCoreV1Secret[$key]" is missing from JSON.');
            assert(json[key] != null,
                'Required key "IoK8sApiCoreV1Secret[$key]" has a null value in JSON.');
          });
          return true;
        }());
  
        return IoK8sApiCoreV1Secret(
          apiVersion: mapValueOfType<String>(json, r'apiVersion'),
          data: mapCastOfType<String, String>(json, r'data') ?? const {},
          immutable: mapValueOfType<bool>(json, r'immutable'),
          kind: mapValueOfType<String>(json, r'kind'),
          metadata: IoK8sApimachineryPkgApisMetaV1ObjectMeta.fromJson(
              json[r'metadata']),
          stringData:
              mapCastOfType<String, String>(json, r'stringData') ?? const {},
          type: mapValueOfType<String>(json, r'type'),
        );
      }
      return null;
    }
  
    static List<IoK8sApiCoreV1Secret>? listFromJson(
      dynamic json, {
      bool growable = false,
    }) {
      final result = <IoK8sApiCoreV1Secret>[];
      if (json is List && json.isNotEmpty) {
        for (final row in json) {
          final value = IoK8sApiCoreV1Secret.fromJson(row);
          if (value != null) {
            result.add(value);
          }
        }
      }
      return result.toList(growable: growable);
    }
  
    static Map<String, IoK8sApiCoreV1Secret> mapFromJson(dynamic json) {
      final map = <String, IoK8sApiCoreV1Secret>{};
      if (json is Map && json.isNotEmpty) {
        json = json.cast<String, dynamic>(); // ignore: parameter_assignments
        for (final entry in json.entries) {
          final value = IoK8sApiCoreV1Secret.fromJson(entry.value);
          if (value != null) {
            map[entry.key] = value;
          }
        }
      }
      return map;
    }
  
    // maps a json object with a list of IoK8sApiCoreV1Secret-objects as value to a dart map
    static Map<String, List<IoK8sApiCoreV1Secret>> mapListFromJson(
      dynamic json, {
      bool growable = false,
    }) {
      final map = <String, List<IoK8sApiCoreV1Secret>>{};
      if (json is Map && json.isNotEmpty) {
        json = json.cast<String, dynamic>(); // ignore: parameter_assignments
        for (final entry in json.entries) {
          final value = IoK8sApiCoreV1Secret.listFromJson(
            entry.value,
            growable: growable,
          );
          if (value != null) {
            map[entry.key] = value;
          }
        }
      }
      return map;
    }
  
    /// The list of required keys that must be present in a JSON.
    static const requiredKeys = <String>{};
  }
  