Class ObjectsResource.RestoreRequest
Restores a soft-deleted object.
Inheritance
Inherited Members
Namespace: Google.Apis.Storage.v1
Assembly: Google.Apis.Storage.v1.dll
Syntax
public class ObjectsResource.RestoreRequest : StorageBaseServiceRequest<Object>, IClientServiceRequest<Object>, IClientServiceRequest
Constructors
RestoreRequest(IClientService, string, string, long)
Constructs a new Restore request.
Declaration
public RestoreRequest(IClientService service, string bucket, string storageObject, long generation)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service | |
| string | bucket | |
| string | storageObject | |
| long | generation |
Properties
Bucket
Name of the bucket in which the object resides.
Declaration
[RequestParameter("bucket", RequestParameterType.Path)]
public virtual string Bucket { get; }
Property Value
| Type | Description |
|---|---|
| string |
CopySourceAcl
If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.
Declaration
[RequestParameter("copySourceAcl", RequestParameterType.Query)]
public virtual bool? CopySourceAcl { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
Generation
Selects a specific revision of this object.
Declaration
[RequestParameter("generation", RequestParameterType.Query)]
public virtual long Generation { get; }
Property Value
| Type | Description |
|---|---|
| long |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
IfGenerationMatch
Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
Declaration
[RequestParameter("ifGenerationMatch", RequestParameterType.Query)]
public virtual long? IfGenerationMatch { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
IfGenerationNotMatch
Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
Declaration
[RequestParameter("ifGenerationNotMatch", RequestParameterType.Query)]
public virtual long? IfGenerationNotMatch { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
IfMetagenerationMatch
Makes the operation conditional on whether the object's one live metageneration matches the given value.
Declaration
[RequestParameter("ifMetagenerationMatch", RequestParameterType.Query)]
public virtual long? IfMetagenerationMatch { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
IfMetagenerationNotMatch
Makes the operation conditional on whether none of the object's live metagenerations match the given value.
Declaration
[RequestParameter("ifMetagenerationNotMatch", RequestParameterType.Query)]
public virtual long? IfMetagenerationNotMatch { get; set; }
Property Value
| Type | Description |
|---|---|
| long? |
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Object
Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
Declaration
[RequestParameter("object", RequestParameterType.Path)]
public virtual string Object { get; }
Property Value
| Type | Description |
|---|---|
| string |
Projection
Set of properties to return. Defaults to full.
Declaration
[RequestParameter("projection", RequestParameterType.Query)]
public virtual ObjectsResource.RestoreRequest.ProjectionEnum? Projection { get; set; }
Property Value
| Type | Description |
|---|---|
| ObjectsResource.RestoreRequest.ProjectionEnum? |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
RestoreToken
Restore token used to differentiate sof-deleted objects with the same name and generation. Only applicable for hierarchical namespace buckets. This parameter is optional, and is only required in the rare case when there are multiple soft-deleted objects with the same name and generation.
Declaration
[RequestParameter("restoreToken", RequestParameterType.Query)]
public virtual string RestoreToken { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
UserProject
The project to be billed for this request. Required for Requester Pays buckets.
Declaration
[RequestParameter("userProject", RequestParameterType.Query)]
public virtual string UserProject { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
InitParameters()
Initializes Restore parameter list.
Declaration
protected override void InitParameters()