Google Cloud Artifact Registry V1 Client - Class CleanupPolicy (0.5.1)

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

Artifact policy configuration for repository cleanup policies.

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

Namespace

Google \ Cloud \ ArtifactRegistry \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ condition Google\Cloud\ArtifactRegistry\V1\CleanupPolicyCondition

Policy condition for matching versions.

↳ most_recent_versions Google\Cloud\ArtifactRegistry\V1\CleanupPolicyMostRecentVersions

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

↳ id string

The user-provided ID of the cleanup policy.

↳ action int

Policy action.

getCondition

Policy condition for matching versions.

Returns
TypeDescription
Google\Cloud\ArtifactRegistry\V1\CleanupPolicyCondition|null

hasCondition

setCondition

Policy condition for matching versions.

Parameter
NameDescription
var Google\Cloud\ArtifactRegistry\V1\CleanupPolicyCondition
Returns
TypeDescription
$this

getMostRecentVersions

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

Returns
TypeDescription
Google\Cloud\ArtifactRegistry\V1\CleanupPolicyMostRecentVersions|null

hasMostRecentVersions

setMostRecentVersions

Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.

Parameter
NameDescription
var Google\Cloud\ArtifactRegistry\V1\CleanupPolicyMostRecentVersions
Returns
TypeDescription
$this

getId

The user-provided ID of the cleanup policy.

Returns
TypeDescription
string

setId

The user-provided ID of the cleanup policy.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAction

Policy action.

Returns
TypeDescription
int

setAction

Policy action.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getConditionType

Returns
TypeDescription
string