Skip to content

Commit 0b1994f

Browse files
1 parent c460230 commit 0b1994f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/ArtifactRegistry/Version.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class Version extends \Google\Collection
3838
* @var string
3939
*/
4040
public $description;
41+
protected $fingerprintsType = Hash::class;
42+
protected $fingerprintsDataType = 'array';
4143
/**
4244
* Output only. Repository-specific Metadata stored against this version. The
4345
* fields returned are defined by the underlying repository-specific resource.
@@ -111,6 +113,24 @@ public function getDescription()
111113
{
112114
return $this->description;
113115
}
116+
/**
117+
* Output only. Immutable reference for the version, calculated based on the
118+
* version's content. Currently we only support dirsum_sha256 hash algorithm.
119+
* Additional hash algorithms may be added in the future.
120+
*
121+
* @param Hash[] $fingerprints
122+
*/
123+
public function setFingerprints($fingerprints)
124+
{
125+
$this->fingerprints = $fingerprints;
126+
}
127+
/**
128+
* @return Hash[]
129+
*/
130+
public function getFingerprints()
131+
{
132+
return $this->fingerprints;
133+
}
114134
/**
115135
* Output only. Repository-specific Metadata stored against this version. The
116136
* fields returned are defined by the underlying repository-specific resource.

0 commit comments

Comments
 (0)