use of bio.terra.workspace.generated.model.ApiControlledResourceMetadata in project terra-workspace-manager by DataBiosphere.
the class ControlledResource method toApiMetadata.
@Override
public ApiResourceMetadata toApiMetadata() {
ApiResourceMetadata metadata = super.toApiMetadata();
var controlled = new ApiControlledResourceMetadata().accessScope(accessScope.toApiModel()).managedBy(managedBy.toApiModel()).privateResourceUser(// TODO: PF-616 figure out how to supply the assigned user's role
new ApiPrivateResourceUser().userName(assignedUser)).privateResourceState(getPrivateResourceState().map(PrivateResourceState::toApiModel).orElse(null));
metadata.controlledResourceMetadata(controlled);
return metadata;
}
Aggregations