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';
  
  class IoK8sApiAuthorizationV1ResourceAttributes {
    /// Returns a new [IoK8sApiAuthorizationV1ResourceAttributes] instance.
    IoK8sApiAuthorizationV1ResourceAttributes({
      this.group,
      this.name,
      this.namespace,
      this.resource,
      this.subresource,
      this.verb,
      this.version,
    });
  
    /// Group is the API Group of the Resource.  \"*\" means all.
    ///
    /// 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? group;
  
    /// Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.
    ///
    /// 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? name;
  
    /// Namespace is the namespace of the action being requested.  Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
    ///
    /// 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? namespace;
  
    /// Resource is one of the existing resource types.  \"*\" means all.
    ///
    /// 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? resource;
  
    /// Subresource is one of the existing resource types.  \"\" means none.
    ///
    /// 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? subresource;
  
    /// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.  \"*\" means all.
    ///
    /// 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? verb;
  
    /// Version is the API Version of the Resource.  \"*\" means all.
    ///
    /// 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? version;
  
    @override
    bool operator ==(Object other) =>
        identical(this, other) ||
        other is IoK8sApiAuthorizationV1ResourceAttributes &&
            other.group == group &&
            other.name == name &&
            other.namespace == namespace &&
            other.resource == resource &&
            other.subresource == subresource &&
            other.verb == verb &&
            other.version == version;
  
    @override
    int get hashCode =>
        // ignore: unnecessary_parenthesis
        (group == null ? 0 : group!.hashCode) +
        (name == null ? 0 : name!.hashCode) +
        (namespace == null ? 0 : namespace!.hashCode) +
        (resource == null ? 0 : resource!.hashCode) +
        (subresource == null ? 0 : subresource!.hashCode) +
        (verb == null ? 0 : verb!.hashCode) +
        (version == null ? 0 : version!.hashCode);
  
    @override
    String toString() =>
        'IoK8sApiAuthorizationV1ResourceAttributes[group=$group, name=$name, namespace=$namespace, resource=$resource, subresource=$subresource, verb=$verb, version=$version]';
  
    Map<String, dynamic> toJson() {
      final json = <String, dynamic>{};
      if (this.group != null) {
        json[r'group'] = this.group;
      } else {
        json[r'group'] = null;
      }
      if (this.name != null) {
        json[r'name'] = this.name;
      } else {
        json[r'name'] = null;
      }
      if (this.namespace != null) {
        json[r'namespace'] = this.namespace;
      } else {
        json[r'namespace'] = null;
      }
      if (this.resource != null) {
        json[r'resource'] = this.resource;
      } else {
        json[r'resource'] = null;
      }
      if (this.subresource != null) {
        json[r'subresource'] = this.subresource;
      } else {
        json[r'subresource'] = null;
      }
      if (this.verb != null) {
        json[r'verb'] = this.verb;
      } else {
        json[r'verb'] = null;
      }
      if (this.version != null) {
        json[r'version'] = this.version;
      } else {
        json[r'version'] = null;
      }
      return json;
    }
  
    /// Returns a new [IoK8sApiAuthorizationV1ResourceAttributes] instance and imports its values from
    /// [value] if it's a [Map], null otherwise.
    // ignore: prefer_constructors_over_static_methods
    static IoK8sApiAuthorizationV1ResourceAttributes? 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 "IoK8sApiAuthorizationV1ResourceAttributes[$key]" is missing from JSON.');
            assert(json[key] != null,
                'Required key "IoK8sApiAuthorizationV1ResourceAttributes[$key]" has a null value in JSON.');
          });
          return true;
        }());
  
        return IoK8sApiAuthorizationV1ResourceAttributes(
          group: mapValueOfType<String>(json, r'group'),
          name: mapValueOfType<String>(json, r'name'),
          namespace: mapValueOfType<String>(json, r'namespace'),
          resource: mapValueOfType<String>(json, r'resource'),
          subresource: mapValueOfType<String>(json, r'subresource'),
          verb: mapValueOfType<String>(json, r'verb'),
          version: mapValueOfType<String>(json, r'version'),
        );
      }
      return null;
    }
  
    static List<IoK8sApiAuthorizationV1ResourceAttributes>? listFromJson(
      dynamic json, {
      bool growable = false,
    }) {
      final result = <IoK8sApiAuthorizationV1ResourceAttributes>[];
      if (json is List && json.isNotEmpty) {
        for (final row in json) {
          final value = IoK8sApiAuthorizationV1ResourceAttributes.fromJson(row);
          if (value != null) {
            result.add(value);
          }
        }
      }
      return result.toList(growable: growable);
    }
  
    static Map<String, IoK8sApiAuthorizationV1ResourceAttributes> mapFromJson(
        dynamic json) {
      final map = <String, IoK8sApiAuthorizationV1ResourceAttributes>{};
      if (json is Map && json.isNotEmpty) {
        json = json.cast<String, dynamic>(); // ignore: parameter_assignments
        for (final entry in json.entries) {
          final value =
              IoK8sApiAuthorizationV1ResourceAttributes.fromJson(entry.value);
          if (value != null) {
            map[entry.key] = value;
          }
        }
      }
      return map;
    }
  
    // maps a json object with a list of IoK8sApiAuthorizationV1ResourceAttributes-objects as value to a dart map
    static Map<String, List<IoK8sApiAuthorizationV1ResourceAttributes>>
        mapListFromJson(
      dynamic json, {
      bool growable = false,
    }) {
      final map = <String, List<IoK8sApiAuthorizationV1ResourceAttributes>>{};
      if (json is Map && json.isNotEmpty) {
        json = json.cast<String, dynamic>(); // ignore: parameter_assignments
        for (final entry in json.entries) {
          final value = IoK8sApiAuthorizationV1ResourceAttributes.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>{};
  }
  