Document constructor

Document({
  1. String? name,
  2. String? displayName,
  3. String? mimeType,
  4. Iterable<Document_KnowledgeType>? knowledgeTypes,
  5. String? contentUri,
  6. @Deprecated('This field is deprecated.') String? content,
  7. Map<String, String>? metadata,
  8. List<int>? rawContent,
  9. bool? enableAutoReload,
  10. 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;
}