# Google Cloud OsConfig V1 Client - Class ZypperRepository (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class ZypperRepository.

Represents a single zypper package repository. These are added to a
repo file that is managed at
`/etc/zypp/repos.d/google_osconfig.repo`.

Generated from protobuf message `google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1 \\ OSPolicy \\ Resource \\ RepositoryResource

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ id` | `string` Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts. |
| `↳ display_name` | `string` The display name of the repository. |
| `↳ base_url` | `string` Required. The location of the repository directory. |
| `↳ gpg_keys` | `string[]` URIs of GPG keys. |

### getId

Required. A one word, unique name for this repository. This is the
`repo id` in the zypper config file and also the `display_name` if
`display_name` is omitted. This id is also used as the unique
identifier when checking for GuestPolicy conflicts.

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

### setId

Required. A one word, unique name for this repository. This is the
`repo id` in the zypper config file and also the `display_name` if
`display_name` is omitted. This id is also used as the unique
identifier when checking for GuestPolicy conflicts.

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

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

### getDisplayName

The display name of the repository.

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

### setDisplayName

The display name of the repository.

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

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

### getBaseUrl

Required. The location of the repository directory.

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

### setBaseUrl

Required. The location of the repository directory.

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

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

### getGpgKeys

URIs of GPG keys.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setGpgKeys

URIs of GPG keys.

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

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