# Google Cloud Talent Solution V4 Client - Class CompensationEntry (2.3.0)

2.3.0 (latest) 2.2.1 2.1.3 2.0.2 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Talent Solution V4 Client class CompensationEntry.

A compensation entry that represents one component of compensation, such
as base pay, bonus, or other compensation type.

Annualization: One compensation entry can be annualized if

- it contains valid [amount](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getAmount__) or [range](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getRange__).
- and its [expected_units_per_year](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getExpectedUnitsPerYear__) is set or can be derived. Its annualized range is determined as ([amount](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getAmount__) or [range](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getRange__)) times [expected_units_per_year](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getExpectedUnitsPerYear__).

Generated from protobuf message `google.cloud.talent.v4.CompensationInfo.CompensationEntry`

## Namespace

Google \\ Cloud \\ Talent \\ V4 \\ CompensationInfo

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Compensation type. Default is [CompensationType.COMPENSATION_TYPE_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationType#_Google_Cloud_Talent_V4_CompensationInfo_CompensationType__COMPENSATION_TYPE_UNSPECIFIED). |
| `↳ unit` | `int` Frequency of the specified amount. Default is [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationUnit#_Google_Cloud_Talent_V4_CompensationInfo_CompensationUnit__COMPENSATION_UNIT_UNSPECIFIED). |
| `↳ amount` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` Compensation amount. |
| `↳ range` | `https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationRange` Compensation range. |
| `↳ description` | `string` Compensation description. For example, could indicate equity terms or provide additional context to an estimated bonus. |
| `↳ expected_units_per_year` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/DoubleValue` Expected number of units paid each year. If not specified, when [Job.employment_types](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.Job#_Google_Cloud_Talent_V4_Job__getEmploymentTypes__) is FULLTIME, a default value is inferred based on [unit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getUnit__). Default values: - HOURLY: 2080 - DAILY: 260 - WEEKLY: 52 - MONTHLY: 12 - ANNUAL: 1 |

### getType

Compensation type.

Default is
[CompensationType.COMPENSATION_TYPE_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationType#_Google_Cloud_Talent_V4_CompensationInfo_CompensationType__COMPENSATION_TYPE_UNSPECIFIED).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CompensationType](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationType). |

### setType

Compensation type.

Default is
[CompensationType.COMPENSATION_TYPE_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationType#_Google_Cloud_Talent_V4_CompensationInfo_CompensationType__COMPENSATION_TYPE_UNSPECIFIED).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CompensationType](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationType). |

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

### getUnit

Frequency of the specified amount.

Default is
[CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationUnit#_Google_Cloud_Talent_V4_CompensationInfo_CompensationUnit__COMPENSATION_UNIT_UNSPECIFIED).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CompensationUnit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationUnit). |

### setUnit

Frequency of the specified amount.

Default is
[CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationUnit#_Google_Cloud_Talent_V4_CompensationInfo_CompensationUnit__COMPENSATION_UNIT_UNSPECIFIED).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CompensationUnit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationUnit). |

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

### getAmount

Compensation amount.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html|null` |   |

### hasAmount

### setAmount

Compensation amount.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Money.html` |

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

### getRange

Compensation range.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationRange|null` |   |

### hasRange

### setRange

Compensation range.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationRange` |

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

### getDescription

Compensation description. For example, could
indicate equity terms or provide additional context to an estimated
bonus.

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

### setDescription

Compensation description. For example, could
indicate equity terms or provide additional context to an estimated
bonus.

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

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

### getExpectedUnitsPerYear

Expected number of units paid each year. If not specified, when
[Job.employment_types](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.Job#_Google_Cloud_Talent_V4_Job__getEmploymentTypes__) is
FULLTIME, a default value is inferred based on
[unit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getUnit__).

Default values:

- HOURLY: 2080
- DAILY: 260
- WEEKLY: 52
- MONTHLY: 12
- ANNUAL: 1

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/DoubleValue|null` |   |

### hasExpectedUnitsPerYear

### clearExpectedUnitsPerYear

### getExpectedUnitsPerYearUnwrapped

Returns the unboxed value from `getExpectedUnitsPerYear()`

Expected number of units paid each year. If not specified, when
[Job.employment_types](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.Job#_Google_Cloud_Talent_V4_Job__getEmploymentTypes__) is
FULLTIME, a default value is inferred based on
[unit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getUnit__).
Default values:

- HOURLY: 2080
- DAILY: 260
- WEEKLY: 52
- MONTHLY: 12
- ANNUAL: 1

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float|null` |   |

### setExpectedUnitsPerYear

Expected number of units paid each year. If not specified, when
[Job.employment_types](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.Job#_Google_Cloud_Talent_V4_Job__getEmploymentTypes__) is
FULLTIME, a default value is inferred based on
[unit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getUnit__).

Default values:

- HOURLY: 2080
- DAILY: 260
- WEEKLY: 52
- MONTHLY: 12
- ANNUAL: 1

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/DoubleValue` |

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

### setExpectedUnitsPerYearUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\DoubleValue object.

Expected number of units paid each year. If not specified, when
[Job.employment_types](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.Job#_Google_Cloud_Talent_V4_Job__getEmploymentTypes__) is
FULLTIME, a default value is inferred based on
[unit](https://docs.cloud.google.com/php/docs/reference/cloud-talent/latest/V4.CompensationInfo.CompensationEntry#_Google_Cloud_Talent_V4_CompensationInfo_CompensationEntry__getUnit__).
Default values:

- HOURLY: 2080
- DAILY: 260
- WEEKLY: 52
- MONTHLY: 12
- ANNUAL: 1

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float|null` |

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

### getCompensationAmount

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