ToolWithApiKeyDto.fromModel constructor
ToolWithApiKeyDto.fromModel(
- ToolModel tool, {
- ServerModel? server,
Implementation
factory ToolWithApiKeyDto.fromModel(ToolModel tool, {ServerModel? server}) =>
ToolWithApiKeyDto(
id: tool.id,
alias: tool.alias,
host: tool.host,
port: tool.port,
apiKey: tool.apiKey,
status: tool.status,
serverId: tool.serverId,
materializedArtifactDigest: tool.materializedArtifactDigest,
contentState: tool.contentState,
server: server != null
? ToolServerDto.fromModel(server)
: tool.serverIdentity == null
? null
: ToolServerDto.fromIdentity(tool.serverIdentity!),
);