Document constructor
Document({
- String? name,
- String? displayName,
- String? mimeType,
- Iterable<
Document_KnowledgeType> ? knowledgeTypes, - String? contentUri,
- @Deprecated('This field is deprecated.') String? content,
- Map<
String, String> ? metadata, - List<
int> ? rawContent, - bool? enableAutoReload,
- Document_ReloadStatus? latestReloadStatus,
Implementation
factory Document({
$core.String? name,
$core.String? displayName,
$core.String? mimeType,
$core.Iterable<Document_KnowledgeType>? knowledgeTypes,
$core.String? contentUri,
@$core.Deprecated('This field is deprecated.') $core.String? content,
$core.Map<$core.String, $core.String>? metadata,
$core.List<$core.int>? rawContent,
$core.bool? enableAutoReload,
Document_ReloadStatus? latestReloadStatus,
}) {
final _result = create();
if (name != null) {
_result.name = name;
}
if (displayName != null) {
_result.displayName = displayName;
}
if (mimeType != null) {
_result.mimeType = mimeType;
}
if (knowledgeTypes != null) {
_result.knowledgeTypes.addAll(knowledgeTypes);
}
if (contentUri != null) {
_result.contentUri = contentUri;
}
if (content != null) {
// ignore: deprecated_member_use_from_same_package
_result.content = content;
}
if (metadata != null) {
_result.metadata.addAll(metadata);
}
if (rawContent != null) {
_result.rawContent = rawContent;
}
if (enableAutoReload != null) {
_result.enableAutoReload = enableAutoReload;
}
if (latestReloadStatus != null) {
_result.latestReloadStatus = latestReloadStatus;
}
return _result;
}