Resource constructor
Implementation
factory Resource(List<api.Attribute> attributeList) {
for (final attribute in attributeList) {
if (attribute.value is! String) {
throw ArgumentError('Attributes value must be String.');
}
}
final attributes = Attributes.empty()..addAll(attributeList);
return Resource.fromAttributes(attributes);
}