1.8.4 (latest) 1.7.2 1.6.0 1.5.0 1.4.0 1.3.1 1.2.1 1.1.3 1.0.0 0.6.5 0.5.1 0.4.4 0.3.13 Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class CleanupPolicyMostRecentVersions.

CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy
for retaining a minimum number of versions.

Generated from protobuf message `google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions`

## Namespace

Google \\ Cloud \\ ArtifactRegistry \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ package_name_prefixes` | `string[]` List of package name prefixes that will apply this rule. |
| `↳ keep_count` | `int` Minimum number of versions to keep. |

### getPackageNamePrefixes

List of package name prefixes that will apply this rule.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setPackageNamePrefixes

List of package name prefixes that will apply this rule.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKeepCount

Minimum number of versions to keep.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasKeepCount

### clearKeepCount

### setKeepCount

Minimum number of versions to keep.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |