// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.0 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: lines_longer_than_80_chars part of openapi.api; class Action { /// Returns a new [Action] instance. Action({ this.groupId, this.deviceId, this.states, this.rawRequest, this.providerId, this.type, this.isForce, }); String groupId; String deviceId; List states; String rawRequest; String providerId; ActionType type; bool isForce; @override bool operator ==(Object other) => identical(this, other) || other is Action && other.groupId == groupId && other.deviceId == deviceId && other.states == states && other.rawRequest == rawRequest && other.providerId == providerId && other.type == type && other.isForce == isForce; @override int get hashCode => (groupId == null ? 0 : groupId.hashCode) + (deviceId == null ? 0 : deviceId.hashCode) + (states == null ? 0 : states.hashCode) + (rawRequest == null ? 0 : rawRequest.hashCode) + (providerId == null ? 0 : providerId.hashCode) + (type == null ? 0 : type.hashCode) + (isForce == null ? 0 : isForce.hashCode); @override String toString() => 'Action[groupId=$groupId, deviceId=$deviceId, states=$states, rawRequest=$rawRequest, providerId=$providerId, type=$type, isForce=$isForce]'; Map toJson() { final json = {}; if (groupId != null) { json[r'groupId'] = groupId; } if (deviceId != null) { json[r'deviceId'] = deviceId; } if (states != null) { json[r'states'] = states; } if (rawRequest != null) { json[r'rawRequest'] = rawRequest; } if (providerId != null) { json[r'providerId'] = providerId; } if (type != null) { json[r'type'] = type; } if (isForce != null) { json[r'isForce'] = isForce; } return json; } /// Returns a new [Action] instance and imports its values from /// [json] if it's non-null, null if [json] is null. static Action fromJson(Map json) => json == null ? null : Action( groupId: json[r'groupId'], deviceId: json[r'deviceId'], states: AutomationState.listFromJson(json[r'states']), rawRequest: json[r'rawRequest'], providerId: json[r'providerId'], type: ActionType.fromJson(json[r'type']), isForce: json[r'isForce'], ); static List listFromJson(List json, {bool emptyIsNull, bool growable,}) => json == null || json.isEmpty ? true == emptyIsNull ? null : [] : json.map((v) => Action.fromJson(v)).toList(growable: true == growable); static Map mapFromJson(Map json) { final map = {}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) => map[key] = Action.fromJson(v)); } return map; } // maps a json object with a list of Action-objects as value to a dart map static Map> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { final map = >{}; if (json != null && json.isNotEmpty) { json.forEach((String key, dynamic v) { map[key] = Action.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); }); } return map; } }