Google Cloud Storage v1 API - Class DownloadObjectOptions (4.10.0)

public sealed class DownloadObjectOptions

Reference documentation and code samples for the Google Cloud Storage v1 API class DownloadObjectOptions.

Options for DownloadObject operations.

Inheritance

object > DownloadObjectOptions

Namespace

Google.Cloud.Storage.V1

Assembly

Google.Cloud.Storage.V1.dll

Properties

ChunkSize

public int? ChunkSize { get; set; }

The chunk size to use for each request.

Property Value
TypeDescription
int

DownloadValidationMode

public DownloadValidationMode? DownloadValidationMode { get; set; }

Specifies whether or not the object's hash should be validated. If this property is null, the hash will always be validated.

Property Value
TypeDescription
DownloadValidationMode
Remarks

This is effectively an escape hatch for situations where hash validation fails. See https://github.com/googleapis/google-cloud-dotnet/issues/1641 for background on this option. It is recommended that you leave this option unset (or use Automatic) unless you are knowingly downloading data for an object where hashing will fail.

The current implementation defaults to Always; in a future major version the default will change to Automatic which will automatically ignore the hash where validation is expected to fail (even with valid data).

EncryptionKey

public EncryptionKey EncryptionKey { get; set; }

The encryption key to use for this operation. If this property is null, the EncryptionKey will be used instead. Use None to remove encryption headers from this request.

Property Value
TypeDescription
EncryptionKey

Generation

public long? Generation { get; set; }

The generation to download. When not specified, the latest version is always downloaded.

Property Value
TypeDescription
long

IfGenerationMatch

public long? IfGenerationMatch { get; set; }

Precondition for download: the object is only downloaded if its generation matches the given value.

Property Value
TypeDescription
long

IfGenerationNotMatch

public long? IfGenerationNotMatch { get; set; }

Precondition for download: the object is only downloaded if its generation does not match the given value.

Property Value
TypeDescription
long

IfMetagenerationMatch

public long? IfMetagenerationMatch { get; set; }

Precondition for download: the object is only downloaded if its meta-generation matches the given value.

Property Value
TypeDescription
long

IfMetagenerationNotMatch

public long? IfMetagenerationNotMatch { get; set; }

Precondition for download: the object is only downloaded if its meta-generation does not match the given value.

Property Value
TypeDescription
long

Range

public RangeHeaderValue Range { get; set; }

If non-null, limits the range of bytes of the object to download.

Property Value
TypeDescription
RangeHeaderValue

UserProject

public string UserProject { get; set; }

If set, this is the ID of the project which will be billed for the request. The caller must have suitable permissions for the project being billed.

Property Value
TypeDescription
string