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

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 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
Type Description
Google\Cloud\ArtifactRegistry\V1\CleanupPolicyCondition|null

hasCondition

setCondition

Policy condition for matching versions.

Parameter
Name Description
var Google\Cloud\ArtifactRegistry\V1\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
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
Name Description
var Google\Cloud\ArtifactRegistry\V1\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