Class ObjectsResource
The "objects" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.Storage.v1beta2
Assembly: Google.Apis.Storage.v1beta2.dll
Syntax
public class ObjectsResource
Constructors
ObjectsResource(IClientService)
Constructs a new resource.
Declaration
public ObjectsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Compose(ComposeRequest, String, String)
Concatenates a list of existing objects into a new object in the same bucket.
Declaration
public virtual ObjectsResource.ComposeRequest Compose(ComposeRequest body, string destinationBucket, string destinationObject)
Parameters
Type | Name | Description |
---|---|---|
ComposeRequest | body | The body of the request. |
System.String | destinationBucket | Name of the bucket containing the source objects. The destination object is stored in this bucket. |
System.String | destinationObject | Name of the new object. |
Returns
Type | Description |
---|---|
ObjectsResource.ComposeRequest |
Copy(Object, String, String, String, String)
Copies an object to a destination in the same location. Optionally overrides metadata.
Declaration
public virtual ObjectsResource.CopyRequest Copy(Object body, string sourceBucket, string sourceObject, string destinationBucket, string destinationObject)
Parameters
Type | Name | Description |
---|---|---|
Object | body | The body of the request. |
System.String | sourceBucket | Name of the bucket in which to find the source object. |
System.String | sourceObject | Name of the source object. |
System.String | destinationBucket | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
System.String | destinationObject | Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. |
Returns
Type | Description |
---|---|
ObjectsResource.CopyRequest |
Delete(String, String)
Deletes data blobs and associated metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.
Declaration
public virtual ObjectsResource.DeleteRequest Delete(string bucket, string storageObject)
Parameters
Type | Name | Description |
---|---|---|
System.String | bucket | Name of the bucket in which the object resides. |
System.String | storageObject | Name of the object. |
Returns
Type | Description |
---|---|
ObjectsResource.DeleteRequest |
Get(String, String)
Retrieves objects or their associated metadata.
Declaration
public virtual ObjectsResource.GetRequest Get(string bucket, string storageObject)
Parameters
Type | Name | Description |
---|---|---|
System.String | bucket | Name of the bucket in which the object resides. |
System.String | storageObject | Name of the object. |
Returns
Type | Description |
---|---|
ObjectsResource.GetRequest |
Insert(Object, String)
Stores new data blobs and associated metadata.
Declaration
public virtual ObjectsResource.InsertRequest Insert(Object body, string bucket)
Parameters
Type | Name | Description |
---|---|---|
Object | body | The body of the request. |
System.String | bucket | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
Returns
Type | Description |
---|---|
ObjectsResource.InsertRequest |
Insert(Object, String, Stream, String)
Stores new data blobs and associated metadata.
Declaration
public virtual ObjectsResource.InsertMediaUpload Insert(Object body, string bucket, Stream stream, string contentType)
Parameters
Type | Name | Description |
---|---|---|
Object | body | The body of the request. |
System.String | bucket | Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. |
System.IO.Stream | stream | The stream to upload. See remarks for further information. |
System.String | contentType | The content type of the stream to upload. |
Returns
Type | Description |
---|---|
ObjectsResource.InsertMediaUpload |
Remarks
Considerations regarding stream
:
-
If
stream
is seekable, then the stream position will be reset to0
before reading commences. Ifstream
is not seekable, then it will be read from its current position. -
Caller is responsible for maintaining the
stream
open until the upload is completed. -
Caller is responsible for closing the
stream
.
List(String)
Retrieves a list of objects matching the criteria.
Declaration
public virtual ObjectsResource.ListRequest List(string bucket)
Parameters
Type | Name | Description |
---|---|---|
System.String | bucket | Name of the bucket in which to look for objects. |
Returns
Type | Description |
---|---|
ObjectsResource.ListRequest |
Patch(Object, String, String)
Updates a data blob's associated metadata. This method supports patch semantics.
Declaration
public virtual ObjectsResource.PatchRequest Patch(Object body, string bucket, string storageObject)
Parameters
Type | Name | Description |
---|---|---|
Object | body | The body of the request. |
System.String | bucket | Name of the bucket in which the object resides. |
System.String | storageObject | Name of the object. |
Returns
Type | Description |
---|---|
ObjectsResource.PatchRequest |
Update(Object, String, String)
Updates a data blob's associated metadata.
Declaration
public virtual ObjectsResource.UpdateRequest Update(Object body, string bucket, string storageObject)
Parameters
Type | Name | Description |
---|---|---|
Object | body | The body of the request. |
System.String | bucket | Name of the bucket in which the object resides. |
System.String | storageObject | Name of the object. |
Returns
Type | Description |
---|---|
ObjectsResource.UpdateRequest |
WatchAll(Channel, String)
Watch for changes on all objects in a bucket.
Declaration
public virtual ObjectsResource.WatchAllRequest WatchAll(Channel body, string bucket)
Parameters
Type | Name | Description |
---|---|---|
Channel | body | The body of the request. |
System.String | bucket | Name of the bucket in which to look for objects. |
Returns
Type | Description |
---|---|
ObjectsResource.WatchAllRequest |