setAttribute method

Future<StatusResponse> setAttribute(
  1. String kref,
  2. String key,
  3. String value
)
inherited

Sets a single metadata attribute.

kref is the entity's kref URI. key is the attribute key. value is the attribute value.

This performs an upsert—creates the key if it doesn't exist, or updates it if it does.

Implementation

Future<StatusResponse> setAttribute(
  String kref,
  String key,
  String value,
) async {
  final request = SetAttributeRequest()
    ..kref = Kref(uri: kref)
    ..key = key
    ..value = value;
  return stub.setAttribute(request, options: callOptions);
}