Google Cloud Artifact Registry V1beta2 Client - Class File (0.4.4)

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

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

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

Namespace

Google \ Cloud \ ArtifactRegistry \ V1beta2

Methods

__construct

Constructor.

Parameters
NameDescription
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\V1beta2\Hash>

The hashes of the file content.

↳ create_time Google\Protobuf\Timestamp

The time when the File was created.

↳ update_time Google\Protobuf\Timestamp

The time when the File was last updated.

↳ owner string

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

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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getSizeBytes

The size of the File in bytes.

Returns
TypeDescription
int|string

setSizeBytes

The size of the File in bytes.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getHashes

The hashes of the file content.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setHashes

The hashes of the file content.

Parameter
NameDescription
var array<Google\Cloud\ArtifactRegistry\V1beta2\Hash>
Returns
TypeDescription
$this

getCreateTime

The time when the File was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

The time when the File was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

The time when the File was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

The time when the File was last updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getOwner

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

Returns
TypeDescription
string

setOwner

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this