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

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
Name Description
data array

Optional. Data for populating the Message object.

↳ condition CleanupPolicyCondition

Policy condition for matching versions.

↳ most_recent_versions 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
Type Description
CleanupPolicyCondition|null

hasCondition

setCondition

Policy condition for matching versions.

Parameter
Name Description
var CleanupPolicyCondition
Returns
Type Description
$this

getMostRecentVersions

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

Returns
Type Description
CleanupPolicyMostRecentVersions|null

hasMostRecentVersions

setMostRecentVersions

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

Parameter
Name Description
var CleanupPolicyMostRecentVersions
Returns
Type Description
$this

getId

The user-provided ID of the cleanup policy.

Returns
Type Description
string

setId

The user-provided ID of the cleanup policy.

Parameter
Name Description
var string
Returns
Type Description
$this

getAction

Policy action.

Returns
Type Description
int

setAction

Policy action.

Parameter
Name Description
var int
Returns
Type Description
$this

getConditionType

Returns
Type Description
string