Class ProjectsResource.LocationsResource.RepositoriesResource.FilesResource
The "files" collection of methods.
Inherited Members
Namespace: Google.Apis.ArtifactRegistry.v1
Assembly: Google.Apis.ArtifactRegistry.v1.dll
Syntax
public class ProjectsResource.LocationsResource.RepositoriesResource.FilesResource
Constructors
FilesResource(IClientService)
Constructs a new resource.
Declaration
public FilesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Delete(string)
Deletes a file and all of its content. It is only allowed on generic repositories. The returned operation will complete once the file has been deleted.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the file to delete. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.DeleteRequest |
Download(string)
Download a file.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.DownloadRequest Download(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the file to download. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.DownloadRequest |
Get(string)
Gets a file.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the file to retrieve. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.GetRequest |
List(string)
Lists files.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The name of the repository whose files will be listed. For example: "projects/p1/locations/us-central1/repositories/repo1 |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.ListRequest |
Patch(GoogleDevtoolsArtifactregistryV1File, string)
Updates a file.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.PatchRequest Patch(GoogleDevtoolsArtifactregistryV1File body, string name)
Parameters
Type | Name | Description |
---|---|---|
GoogleDevtoolsArtifactregistryV1File | body | The body of the request. |
string | name | The name of the file, for example:
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.PatchRequest |
Upload(UploadFileRequest, string)
Directly uploads a file to a repository. The returned Operation will complete once the resources are uploaded.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.UploadRequest Upload(UploadFileRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
UploadFileRequest | body | The body of the request. |
string | parent | Required. The resource name of the repository where the file will be uploaded. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.UploadRequest |
Upload(UploadFileRequest, string, Stream, string)
Directly uploads a file to a repository. The returned Operation will complete once the resources are uploaded.
Declaration
public virtual ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.UploadMediaUpload Upload(UploadFileRequest body, string parent, Stream stream, string contentType)
Parameters
Type | Name | Description |
---|---|---|
UploadFileRequest | body | The body of the request. |
string | parent | Required. The resource name of the repository where the file will be uploaded. |
Stream | stream | The stream to upload. See remarks for further information. |
string | contentType | The content type of the stream to upload. |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.RepositoriesResource.FilesResource.UploadMediaUpload |
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