blob: 9886ed7ad0cc2ce969e7a740277029e1fb093279 [file]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// DO NOT EDIT IT MANUALLY. This file is generated by opendal/dev/src/generate/dotnet.rs.
using OpenDAL.Interop.NativeObject;
namespace OpenDAL;
/// <summary>
/// Capability is used to describe what operations are supported by current operator.
/// </summary>
/// <remarks>
/// This model maps from native capability payload returned by OpenDAL.
/// Absent size limits are represented by a native sentinel value and surface
/// as <c>null</c>.
/// </remarks>
public struct Capability
{
internal Capability(OpenDALCapability native)
{
Stat = native.stat != 0;
StatWithIfMatch = native.statWithIfMatch != 0;
StatWithIfNoneMatch = native.statWithIfNoneMatch != 0;
StatWithIfVersionMatch = native.statWithIfVersionMatch != 0;
StatWithIfVersionNotMatch = native.statWithIfVersionNotMatch != 0;
StatWithIfModifiedSince = native.statWithIfModifiedSince != 0;
StatWithIfUnmodifiedSince = native.statWithIfUnmodifiedSince != 0;
StatWithOverrideCacheControl = native.statWithOverrideCacheControl != 0;
StatWithOverrideContentDisposition = native.statWithOverrideContentDisposition != 0;
StatWithOverrideContentType = native.statWithOverrideContentType != 0;
StatWithVersion = native.statWithVersion != 0;
Read = native.read != 0;
ReadWithIfMatch = native.readWithIfMatch != 0;
ReadWithIfNoneMatch = native.readWithIfNoneMatch != 0;
ReadWithIfVersionMatch = native.readWithIfVersionMatch != 0;
ReadWithIfVersionNotMatch = native.readWithIfVersionNotMatch != 0;
ReadWithIfModifiedSince = native.readWithIfModifiedSince != 0;
ReadWithIfUnmodifiedSince = native.readWithIfUnmodifiedSince != 0;
ReadWithOverrideCacheControl = native.readWithOverrideCacheControl != 0;
ReadWithOverrideContentDisposition = native.readWithOverrideContentDisposition != 0;
ReadWithOverrideContentType = native.readWithOverrideContentType != 0;
ReadWithVersion = native.readWithVersion != 0;
ReadWithSuffix = native.readWithSuffix != 0;
Write = native.write != 0;
WriteCanMulti = native.writeCanMulti != 0;
WriteCanEmpty = native.writeCanEmpty != 0;
WriteCanAppend = native.writeCanAppend != 0;
WriteCanCopyFrom = native.writeCanCopyFrom != 0;
WriteWithContentType = native.writeWithContentType != 0;
WriteWithContentDisposition = native.writeWithContentDisposition != 0;
WriteWithContentEncoding = native.writeWithContentEncoding != 0;
WriteWithCacheControl = native.writeWithCacheControl != 0;
WriteWithIfMatch = native.writeWithIfMatch != 0;
WriteWithIfNoneMatch = native.writeWithIfNoneMatch != 0;
WriteWithIfVersionMatch = native.writeWithIfVersionMatch != 0;
WriteWithIfVersionNotMatch = native.writeWithIfVersionNotMatch != 0;
WriteWithIfNotExists = native.writeWithIfNotExists != 0;
WriteWithUserMetadata = native.writeWithUserMetadata != 0;
WriteMultiMaxSize = native.writeMultiMaxSize == nuint.MaxValue ? null : native.writeMultiMaxSize;
WriteMultiMinSize = native.writeMultiMinSize == nuint.MaxValue ? null : native.writeMultiMinSize;
WriteTotalMaxSize = native.writeTotalMaxSize == nuint.MaxValue ? null : native.writeTotalMaxSize;
CreateDir = native.createDir != 0;
Delete = native.delete != 0;
DeleteWithVersion = native.deleteWithVersion != 0;
DeleteWithRecursive = native.deleteWithRecursive != 0;
DeleteWithIfMatch = native.deleteWithIfMatch != 0;
DeleteWithIfNoneMatch = native.deleteWithIfNoneMatch != 0;
DeleteWithIfVersionMatch = native.deleteWithIfVersionMatch != 0;
DeleteWithIfVersionNotMatch = native.deleteWithIfVersionNotMatch != 0;
DeleteMaxSize = native.deleteMaxSize == nuint.MaxValue ? null : native.deleteMaxSize;
Copy = native.copy != 0;
CopyWithIfNotExists = native.copyWithIfNotExists != 0;
CopyWithIfMatch = native.copyWithIfMatch != 0;
CopyWithIfNoneMatch = native.copyWithIfNoneMatch != 0;
CopyWithIfVersionMatch = native.copyWithIfVersionMatch != 0;
CopyWithIfVersionNotMatch = native.copyWithIfVersionNotMatch != 0;
CopyWithSourceVersion = native.copyWithSourceVersion != 0;
CopyCanMulti = native.copyCanMulti != 0;
CopyMultiMaxSize = native.copyMultiMaxSize == nuint.MaxValue ? null : native.copyMultiMaxSize;
CopyMultiMinSize = native.copyMultiMinSize == nuint.MaxValue ? null : native.copyMultiMinSize;
Restore = native.restore != 0;
RestoreWithVersion = native.restoreWithVersion != 0;
RestoreWithIfNotExists = native.restoreWithIfNotExists != 0;
Rename = native.rename != 0;
RenameWithIfNotExists = native.renameWithIfNotExists != 0;
List = native.list != 0;
ListWithLimit = native.listWithLimit != 0;
ListWithStartAfter = native.listWithStartAfter != 0;
ListWithRecursive = native.listWithRecursive != 0;
ListWithVersions = native.listWithVersions != 0;
ListWithDeleted = native.listWithDeleted != 0;
Presign = native.presign != 0;
PresignRead = native.presignRead != 0;
PresignStat = native.presignStat != 0;
PresignWrite = native.presignWrite != 0;
PresignDelete = native.presignDelete != 0;
Shared = native.shared != 0;
}
/// <summary>
/// Indicates if the operator supports metadata retrieval operations.
/// </summary>
public bool Stat { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using If-Match are supported.
/// </summary>
public bool StatWithIfMatch { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using If-None-Match are supported.
/// </summary>
public bool StatWithIfNoneMatch { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using version match are supported.
/// </summary>
public bool StatWithIfVersionMatch { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using version non-match are supported.
/// </summary>
public bool StatWithIfVersionNotMatch { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using If-Modified-Since are supported.
/// </summary>
public bool StatWithIfModifiedSince { get; private set; }
/// <summary>
/// Indicates if conditional stat operations using If-Unmodified-Since are supported.
/// </summary>
public bool StatWithIfUnmodifiedSince { get; private set; }
/// <summary>
/// Indicates if Cache-Control header override is supported during stat operations.
/// </summary>
public bool StatWithOverrideCacheControl { get; private set; }
/// <summary>
/// Indicates if Content-Disposition header override is supported during stat operations.
/// </summary>
public bool StatWithOverrideContentDisposition { get; private set; }
/// <summary>
/// Indicates if Content-Type header override is supported during stat operations.
/// </summary>
public bool StatWithOverrideContentType { get; private set; }
/// <summary>
/// Indicates if versions stat operations are supported.
/// </summary>
public bool StatWithVersion { get; private set; }
/// <summary>
/// Indicates if the operator supports read operations.
/// </summary>
public bool Read { get; private set; }
/// <summary>
/// Indicates if conditional read operations using If-Match are supported.
/// </summary>
public bool ReadWithIfMatch { get; private set; }
/// <summary>
/// Indicates if conditional read operations using If-None-Match are supported.
/// </summary>
public bool ReadWithIfNoneMatch { get; private set; }
/// <summary>
/// Indicates if conditional read operations using version match are supported.
/// </summary>
public bool ReadWithIfVersionMatch { get; private set; }
/// <summary>
/// Indicates if conditional read operations using version non-match are supported.
/// </summary>
public bool ReadWithIfVersionNotMatch { get; private set; }
/// <summary>
/// Indicates if conditional read operations using If-Modified-Since are supported.
/// </summary>
public bool ReadWithIfModifiedSince { get; private set; }
/// <summary>
/// Indicates if conditional read operations using If-Unmodified-Since are supported.
/// </summary>
public bool ReadWithIfUnmodifiedSince { get; private set; }
/// <summary>
/// Indicates if Cache-Control header override is supported during read operations.
/// </summary>
public bool ReadWithOverrideCacheControl { get; private set; }
/// <summary>
/// Indicates if Content-Disposition header override is supported during read operations.
/// </summary>
public bool ReadWithOverrideContentDisposition { get; private set; }
/// <summary>
/// Indicates if Content-Type header override is supported during read operations.
/// </summary>
public bool ReadWithOverrideContentType { get; private set; }
/// <summary>
/// Indicates if versions read operations are supported.
/// </summary>
public bool ReadWithVersion { get; private set; }
/// <summary>
/// Indicates if suffix read operations are supported.
/// </summary>
public bool ReadWithSuffix { get; private set; }
/// <summary>
/// Indicates if the operator supports write operations.
/// </summary>
public bool Write { get; private set; }
/// <summary>
/// Indicates if multiple write operations can be performed on the same object.
/// </summary>
public bool WriteCanMulti { get; private set; }
/// <summary>
/// Indicates if writing empty content is supported.
/// </summary>
public bool WriteCanEmpty { get; private set; }
/// <summary>
/// Indicates if append operations are supported.
/// </summary>
public bool WriteCanAppend { get; private set; }
/// <summary>
/// Indicates if a non-append writer can natively copy source ranges into an in-progress write. `Writer::copy_from` remains available through streaming fallback when false or when appending.
/// </summary>
public bool WriteCanCopyFrom { get; private set; }
/// <summary>
/// Indicates if Content-Type can be specified during write operations.
/// </summary>
public bool WriteWithContentType { get; private set; }
/// <summary>
/// Indicates if Content-Disposition can be specified during write operations.
/// </summary>
public bool WriteWithContentDisposition { get; private set; }
/// <summary>
/// Indicates if Content-Encoding can be specified during write operations.
/// </summary>
public bool WriteWithContentEncoding { get; private set; }
/// <summary>
/// Indicates if Cache-Control can be specified during write operations.
/// </summary>
public bool WriteWithCacheControl { get; private set; }
/// <summary>
/// Indicates if conditional write operations using If-Match are supported.
/// </summary>
public bool WriteWithIfMatch { get; private set; }
/// <summary>
/// Indicates if conditional write operations using If-None-Match are supported.
/// </summary>
public bool WriteWithIfNoneMatch { get; private set; }
/// <summary>
/// Indicates if conditional write operations using version match are supported.
/// </summary>
public bool WriteWithIfVersionMatch { get; private set; }
/// <summary>
/// Indicates if conditional write operations using version non-match are supported.
/// </summary>
public bool WriteWithIfVersionNotMatch { get; private set; }
/// <summary>
/// Indicates if write operations can be conditional on object non-existence.
/// </summary>
public bool WriteWithIfNotExists { get; private set; }
/// <summary>
/// Indicates if custom user metadata can be attached during write operations.
/// </summary>
public bool WriteWithUserMetadata { get; private set; }
/// <summary>
/// Maximum size supported for multipart uploads. For example, AWS S3 supports up to 5GiB per part in multipart uploads.
/// </summary>
public ulong? WriteMultiMaxSize { get; private set; }
/// <summary>
/// Minimum size required for multipart uploads (except for the last part). For example, AWS S3 requires at least 5MiB per part.
/// </summary>
public ulong? WriteMultiMinSize { get; private set; }
/// <summary>
/// Maximum total size supported for write operations. For example, Cloudflare D1 has a 1MB total size limit.
/// </summary>
public ulong? WriteTotalMaxSize { get; private set; }
/// <summary>
/// Indicates if directory creation is supported.
/// </summary>
public bool CreateDir { get; private set; }
/// <summary>
/// Indicates if delete operations are supported.
/// </summary>
public bool Delete { get; private set; }
/// <summary>
/// Indicates if versions delete operations are supported.
/// </summary>
public bool DeleteWithVersion { get; private set; }
/// <summary>
/// Indicates if recursive delete operations are supported.
/// </summary>
public bool DeleteWithRecursive { get; private set; }
/// <summary>
/// Indicates if conditional delete operations using If-Match are supported.
/// </summary>
public bool DeleteWithIfMatch { get; private set; }
/// <summary>
/// Indicates if conditional delete operations using If-None-Match are supported.
/// </summary>
public bool DeleteWithIfNoneMatch { get; private set; }
/// <summary>
/// Indicates if conditional delete operations using version match are supported.
/// </summary>
public bool DeleteWithIfVersionMatch { get; private set; }
/// <summary>
/// Indicates if conditional delete operations using version non-match are supported.
/// </summary>
public bool DeleteWithIfVersionNotMatch { get; private set; }
/// <summary>
/// Maximum size supported for single delete operations.
/// </summary>
public ulong? DeleteMaxSize { get; private set; }
/// <summary>
/// Indicates if copy operations are supported.
/// </summary>
public bool Copy { get; private set; }
/// <summary>
/// Indicates if conditional copy operations with if-not-exists are supported.
/// </summary>
public bool CopyWithIfNotExists { get; private set; }
/// <summary>
/// Indicates if conditional copy operations with if-match are supported.
/// </summary>
public bool CopyWithIfMatch { get; private set; }
/// <summary>
/// Indicates if conditional copy operations with if-none-match are supported.
/// </summary>
public bool CopyWithIfNoneMatch { get; private set; }
/// <summary>
/// Indicates if conditional copy operations using version match are supported.
/// </summary>
public bool CopyWithIfVersionMatch { get; private set; }
/// <summary>
/// Indicates if conditional copy operations using version non-match are supported.
/// </summary>
public bool CopyWithIfVersionNotMatch { get; private set; }
/// <summary>
/// Indicates if copy operations from a specific source version are supported.
/// </summary>
public bool CopyWithSourceVersion { get; private set; }
/// <summary>
/// Indicates if copy operations can be split into multiple server-side tasks.
/// </summary>
public bool CopyCanMulti { get; private set; }
/// <summary>
/// Maximum size supported for segmented copy tasks.
/// </summary>
public ulong? CopyMultiMaxSize { get; private set; }
/// <summary>
/// Minimum size required for segmented copy tasks.
/// </summary>
public ulong? CopyMultiMinSize { get; private set; }
/// <summary>
/// Indicates if restore operations are supported.
/// </summary>
public bool Restore { get; private set; }
/// <summary>
/// Indicates if restoring a specific version is supported.
/// </summary>
public bool RestoreWithVersion { get; private set; }
/// <summary>
/// Indicates if conditional restore operations using if-not-exists are supported.
/// </summary>
public bool RestoreWithIfNotExists { get; private set; }
/// <summary>
/// Indicates if rename operations are supported.
/// </summary>
public bool Rename { get; private set; }
/// <summary>
/// Indicates if conditional rename operations with if-not-exists are supported.
/// </summary>
public bool RenameWithIfNotExists { get; private set; }
/// <summary>
/// Indicates if list operations are supported.
/// </summary>
public bool List { get; private set; }
/// <summary>
/// Indicates if list operations support result limiting.
/// </summary>
public bool ListWithLimit { get; private set; }
/// <summary>
/// Indicates if list operations support continuation from a specific point.
/// </summary>
public bool ListWithStartAfter { get; private set; }
/// <summary>
/// Indicates if recursive listing is supported.
/// </summary>
public bool ListWithRecursive { get; private set; }
/// <summary>
/// Indicates if listing with versions included is supported.
/// </summary>
public bool ListWithVersions { get; private set; }
/// <summary>
/// Indicates if listing with deleted files included is supported.
/// </summary>
public bool ListWithDeleted { get; private set; }
/// <summary>
/// Indicates if presigned URL generation is supported.
/// </summary>
public bool Presign { get; private set; }
/// <summary>
/// Indicates if presigned URLs for read operations are supported.
/// </summary>
public bool PresignRead { get; private set; }
/// <summary>
/// Indicates if presigned URLs for stat operations are supported.
/// </summary>
public bool PresignStat { get; private set; }
/// <summary>
/// Indicates if presigned URLs for write operations are supported.
/// </summary>
public bool PresignWrite { get; private set; }
/// <summary>
/// Indicates if presigned URLs for delete operations are supported.
/// </summary>
public bool PresignDelete { get; private set; }
/// <summary>
/// Indicate if the operator supports shared access.
/// </summary>
public bool Shared { get; private set; }
}