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 Repository.

A Repository for storing artifacts with a specific format.

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

## Namespace

Google \\ Cloud \\ ArtifactRegistry \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ maven_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.MavenRepositoryConfig` Maven repository config contains repository level configuration for the repositories of maven type. |
| `↳ docker_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.DockerRepositoryConfig` Docker repository config contains repository level configuration for the repositories of docker type. |
| `↳ virtual_repository_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.VirtualRepositoryConfig` Configuration specific for a Virtual Repository. |
| `↳ remote_repository_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.RemoteRepositoryConfig` Configuration specific for a Remote Repository. |
| `↳ name` | `string` The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique. |
| `↳ format` | `int` Optional. The format of packages that are stored in the repository. |
| `↳ description` | `string` The user-provided description of the repository. |
| `↳ labels` | `array|Google\Protobuf\Internal\MapField` Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes. |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. The time when the repository was created. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. The time when the repository was last updated. |
| `↳ kms_key_name` | `string` The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created. |
| `↳ mode` | `int` Optional. The mode of the repository. |
| `↳ cleanup_policies` | `array|Google\Protobuf\Internal\MapField` Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
| `↳ size_bytes` | `int|string` Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs. |
| `↳ satisfies_pzs` | `bool` Output only. Whether or not this repository satisfies PZS. |
| `↳ cleanup_policy_dry_run` | `bool` Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
| `↳ vulnerability_scanning_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.VulnerabilityScanningConfig` Optional. Config and state for vulnerability scanning of resources within this Repository. |
| `↳ disallow_unspecified_mode` | `bool` Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
| `↳ satisfies_pzi` | `bool` Output only. Whether or not this repository satisfies PZI. |
| `↳ registry_uri` | `string` Output only. The repository endpoint, for example: `us-docker.pkg.dev/my-proj/my-repo`. |

### getMavenConfig

Maven repository config contains repository level configuration
for the repositories of maven type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.MavenRepositoryConfig|null` |   |

### hasMavenConfig

### setMavenConfig

Maven repository config contains repository level configuration
for the repositories of maven type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.MavenRepositoryConfig` |

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

### getDockerConfig

Docker repository config contains repository level configuration
for the repositories of docker type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.DockerRepositoryConfig|null` |   |

### hasDockerConfig

### setDockerConfig

Docker repository config contains repository level configuration
for the repositories of docker type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.DockerRepositoryConfig` |

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

### getVirtualRepositoryConfig

Configuration specific for a Virtual Repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.VirtualRepositoryConfig|null` |   |

### hasVirtualRepositoryConfig

### setVirtualRepositoryConfig

Configuration specific for a Virtual Repository.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.VirtualRepositoryConfig` |

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

### getRemoteRepositoryConfig

Configuration specific for a Remote Repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.RemoteRepositoryConfig|null` |   |

### hasRemoteRepositoryConfig

### setRemoteRepositoryConfig

Configuration specific for a Remote Repository.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.RemoteRepositoryConfig` |

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

### getName

The name of the repository, for example:
`projects/p1/locations/us-central1/repositories/repo1`. For each location
in a project, repository names must be unique.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The name of the repository, for example:
`projects/p1/locations/us-central1/repositories/repo1`. For each location
in a project, repository names must be unique.

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

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

### getFormat

Optional. The format of packages that are stored in the repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Format](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.Format). |

### setFormat

Optional. The format of packages that are stored in the repository.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Format](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.Format). |

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

### getDescription

The user-provided description of the repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

The user-provided description of the repository.

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

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

### getLabels

Labels with user-defined metadata.

This field may contain up to 64 entries. Label keys and values may be no
longer than 63 characters. Label keys must begin with a lowercase letter
and may only contain lowercase letters, numeric characters, underscores,
and dashes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setLabels

Labels with user-defined metadata.

This field may contain up to 64 entries. Label keys and values may be no
longer than 63 characters. Label keys must begin with a lowercase letter
and may only contain lowercase letters, numeric characters, underscores,
and dashes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getCreateTime

Output only. The time when the repository was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the repository was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

Output only. The time when the repository was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time when the repository was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getKmsKeyName

The Cloud KMS resource name of the customer managed encryption key that's
used to encrypt the contents of the Repository. Has the form:
`projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.

This value may not be changed after the Repository has been created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKmsKeyName

The Cloud KMS resource name of the customer managed encryption key that's
used to encrypt the contents of the Repository. Has the form:
`projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.

This value may not be changed after the Repository has been created.

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

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

### getMode

Optional. The mode of the repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Mode](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.Mode). |

### setMode

Optional. The mode of the repository.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Mode](https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.Mode). |

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

### getCleanupPolicies

Optional. Cleanup policies for this repository. Cleanup policies indicate
when certain package versions can be automatically deleted. Map keys are
policy IDs supplied by users during policy creation. They must unique
within a repository and be under 128 characters in length.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setCleanupPolicies

Optional. Cleanup policies for this repository. Cleanup policies indicate
when certain package versions can be automatically deleted. Map keys are
policy IDs supplied by users during policy creation. They must unique
within a repository and be under 128 characters in length.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getSizeBytes

Output only. The size, in bytes, of all artifact storage in this
repository. Repositories that are generally available or in public preview
use this to calculate storage costs.

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

### setSizeBytes

Output only. The size, in bytes, of all artifact storage in this
repository. Repositories that are generally available or in public preview
use this to calculate storage costs.

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

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

### getSatisfiesPzs

Output only. Whether or not this repository satisfies PZS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSatisfiesPzs

Output only. Whether or not this repository satisfies PZS.

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

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

### getCleanupPolicyDryRun

Optional. If true, the cleanup pipeline is prevented from deleting versions
in this repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setCleanupPolicyDryRun

Optional. If true, the cleanup pipeline is prevented from deleting versions
in this repository.

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

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

### getVulnerabilityScanningConfig

Optional. Config and state for vulnerability scanning of resources within
this Repository.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.VulnerabilityScanningConfig|null` |   |

### hasVulnerabilityScanningConfig

### clearVulnerabilityScanningConfig

### setVulnerabilityScanningConfig

Optional. Config and state for vulnerability scanning of resources within
this Repository.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-artifact-registry/latest/V1.Repository.VulnerabilityScanningConfig` |

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

### getDisallowUnspecifiedMode

Optional. If this is true, an unspecified repo type will be treated as
error rather than defaulting to standard.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDisallowUnspecifiedMode

Optional. If this is true, an unspecified repo type will be treated as
error rather than defaulting to standard.

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

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

### getSatisfiesPzi

Output only. Whether or not this repository satisfies PZI.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setSatisfiesPzi

Output only. Whether or not this repository satisfies PZI.

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

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

### getRegistryUri

Output only. The repository endpoint, for example:
`us-docker.pkg.dev/my-proj/my-repo`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRegistryUri

Output only. The repository endpoint, for example:
`us-docker.pkg.dev/my-proj/my-repo`.

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

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

### getFormatConfig

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### getModeConfig

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |