Class ObjectsResource
The "objects" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.Storage.v1beta1
Assembly: Google.Apis.Storage.v1beta1.dll
Syntax
public class ObjectsResource
Constructors
ObjectsResource(IClientService)
Constructs a new resource.
Declaration
public ObjectsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Delete(String, String)
Deletes data blobs and associated metadata.
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 |