ModelQuery constructor

ModelQuery({
  1. InferenceFramework? framework,
  2. ModelCategory? category,
  3. ModelFormat? format,
  4. bool? downloadedOnly,
  5. bool? availableOnly,
  6. Int64? maxSizeBytes,
  7. String? searchQuery,
  8. ModelSource? source,
  9. ModelQuerySortField? sortField,
  10. ModelQuerySortOrder? sortOrder,
  11. ModelRegistryStatus? registryStatus,
})

Implementation

factory ModelQuery({
  InferenceFramework? framework,
  ModelCategory? category,
  ModelFormat? format,
  $core.bool? downloadedOnly,
  $core.bool? availableOnly,
  $fixnum.Int64? maxSizeBytes,
  $core.String? searchQuery,
  ModelSource? source,
  ModelQuerySortField? sortField,
  ModelQuerySortOrder? sortOrder,
  ModelRegistryStatus? registryStatus,
}) {
  final result = create();
  if (framework != null) result.framework = framework;
  if (category != null) result.category = category;
  if (format != null) result.format = format;
  if (downloadedOnly != null) result.downloadedOnly = downloadedOnly;
  if (availableOnly != null) result.availableOnly = availableOnly;
  if (maxSizeBytes != null) result.maxSizeBytes = maxSizeBytes;
  if (searchQuery != null) result.searchQuery = searchQuery;
  if (source != null) result.source = source;
  if (sortField != null) result.sortField = sortField;
  if (sortOrder != null) result.sortOrder = sortOrder;
  if (registryStatus != null) result.registryStatus = registryStatus;
  return result;
}