Google Cloud Artifact Registry V1 Client - Class File (1.1.0)

Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class File.

Files store content that is potentially associated with Packages or Versions.

Generated from protobuf message google.devtools.artifactregistry.v1.File

Namespace

Google \ Cloud \ ArtifactRegistry \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

The name of the file, for example: projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt. If the file ID part contains slashes, they are escaped.

↳ size_bytes int|string

The size of the File in bytes.

↳ hashes array<Google\Cloud\ArtifactRegistry\V1\Hash>

The hashes of the file content.

↳ create_time Google\Protobuf\Timestamp

Output only. The time when the File was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time when the File was last updated.

↳ owner string

The name of the Package or Version that owns this file, if any.

↳ fetch_time Google\Protobuf\Timestamp

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

↳ annotations array|Google\Protobuf\Internal\MapField

Optional. Client specified annotations.

getName

The name of the file, for example: projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt.

If the file ID part contains slashes, they are escaped.

Returns
Type Description
string

setName

The name of the file, for example: projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt.

If the file ID part contains slashes, they are escaped.

Parameter
Name Description
var string
Returns
Type Description
$this

getSizeBytes

The size of the File in bytes.

Returns
Type Description
int|string

setSizeBytes

The size of the File in bytes.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getHashes

The hashes of the file content.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setHashes

The hashes of the file content.

Parameter
Name Description
var array<Google\Cloud\ArtifactRegistry\V1\Hash>
Returns
Type Description
$this

getCreateTime

Output only. The time when the File was created.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time when the File was created.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The time when the File was last updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time when the File was last updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getOwner

The name of the Package or Version that owns this file, if any.

Returns
Type Description
string

setOwner

The name of the Package or Version that owns this file, if any.

Parameter
Name Description
var string
Returns
Type Description
$this

getFetchTime

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasFetchTime

clearFetchTime

setFetchTime

Output only. The time when the last attempt to refresh the file's data was made. Only set when the repository is remote.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getAnnotations

Optional. Client specified annotations.

Returns
Type Description
Google\Protobuf\Internal\MapField

setAnnotations

Optional. Client specified annotations.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this