Artifact constructor

Artifact(
  1. ArtifactResponse response,
  2. dynamic client
)

Creates an Artifact from a protobuf response.

Implementation

Artifact(pb.ArtifactResponse response, dynamic client) : super(client) {
  kref = Kref(response.kref.uri);
  name = response.name;
  location = response.location;
  revisionKref = Kref(response.revisionKref.uri);
  itemKref = response.hasItemKref() ? Kref(response.itemKref.uri) : null;
  createdAt = response.createdAt.isEmpty ? null : response.createdAt;
  author = response.author;
  metadata = Map<String, String>.from(response.metadata);
  deprecated = response.deprecated;
  username = response.username;
}