# Google Cloud Channel V1 Client - Class Entitlement (2.4.1)

2.4.1 (latest) 2.4.0 2.3.1 2.2.1 2.1.4 2.0.0 1.9.5 1.8.2 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Channel V1 Client class Entitlement.

An entitlement is a representation of a customer's ability to use a service.

Generated from protobuf message `google.cloud.channel.v1.Entitlement`

## Namespace

Google \\ Cloud \\ Channel \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Resource name of an entitlement in the form: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time at which the entitlement is created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time at which the entitlement is updated. |
| `↳ offer` | `string` Required. The offer resource name for which the entitlement is to be created. Takes the form: accounts/{account_id}/offers/{offer_id}. |
| `↳ commitment_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.CommitmentSettings` Commitment settings for a commitment-based Offer. Required for commitment based offers. |
| `↳ provisioning_state` | `int` Output only. Current provisioning state of the entitlement. |
| `↳ provisioned_service` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.ProvisionedService` Output only. Service provisioning details for the entitlement. |
| `↳ suspension_reasons` | `int[]` Output only. Enumerable of all current suspension reasons for an entitlement. |
| `↳ purchase_order_id` | `string` Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. This is only supported for Google Workspace entitlements. |
| `↳ trial_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.TrialSettings` Output only. Settings for trial offers. |
| `↳ association_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.AssociationInfo` Association information to other entitlements. |
| `↳ parameters` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Parameter>` Extended entitlement parameters. When creating an entitlement, valid parameter names and values are defined in the [Offer.parameter_definitions](https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Offer#_Google_Cloud_Channel_V1_Offer__getParameterDefinitions__). For Google Workspace, the following Parameters may be accepted as input: - max_units: The maximum assignable units for a flexible offer OR - num_units: The total commitment for commitment-based offers The response may additionally include the following output-only Parameters: - assigned_units: The number of licenses assigned to users. For Google Cloud billing subaccounts, the following Parameter may be accepted as input: - display_name: The display name of the billing subaccount. |
| `↳ billing_account` | `string` Optional. The billing account resource name that is used to pay for this entitlement. |
| `↳ price_reference_id` | `string` Optional. Price reference ID for the offer. Only for offers that require additional price information. Used to guarantee that the pricing is consistent between quoting the offer and placing the order. |

### getName

Output only. Resource name of an entitlement in the form:
accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.

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

### setName

Output only. Resource name of an entitlement in the form:
accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.

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

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

### getCreateTime

Output only. The time at which the entitlement is created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time at which the entitlement is created.

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

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

### getUpdateTime

Output only. The time at which the entitlement is updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time at which the entitlement is updated.

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

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

### getOffer

Required. The offer resource name for which the entitlement is to be
created. Takes the form: accounts/{account_id}/offers/{offer_id}.

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

### setOffer

Required. The offer resource name for which the entitlement is to be
created. Takes the form: accounts/{account_id}/offers/{offer_id}.

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

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

### getCommitmentSettings

Commitment settings for a commitment-based Offer.

Required for commitment based offers.

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

### hasCommitmentSettings

### clearCommitmentSettings

### setCommitmentSettings

Commitment settings for a commitment-based Offer.

Required for commitment based offers.

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

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

### getProvisioningState

Output only. Current provisioning state of the entitlement.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ProvisioningState](https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Entitlement.ProvisioningState). |

### setProvisioningState

Output only. Current provisioning state of the entitlement.

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

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

### getProvisionedService

Output only. Service provisioning details for the entitlement.

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

### hasProvisionedService

### clearProvisionedService

### setProvisionedService

Output only. Service provisioning details for the entitlement.

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

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

### getSuspensionReasons

Output only. Enumerable of all current suspension reasons for an
entitlement.

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

### setSuspensionReasons

Output only. Enumerable of all current suspension reasons for an
entitlement.

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

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

### getPurchaseOrderId

Optional. This purchase order (PO) information is for resellers to use for
their company tracking usage. If a purchaseOrderId value is given, it
appears in the API responses and shows up in the invoice. The property
accepts up to 80 plain text characters. This is only supported for Google
Workspace entitlements.

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

### setPurchaseOrderId

Optional. This purchase order (PO) information is for resellers to use for
their company tracking usage. If a purchaseOrderId value is given, it
appears in the API responses and shows up in the invoice. The property
accepts up to 80 plain text characters. This is only supported for Google
Workspace entitlements.

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

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

### getTrialSettings

Output only. Settings for trial offers.

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

### hasTrialSettings

### clearTrialSettings

### setTrialSettings

Output only. Settings for trial offers.

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

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

### getAssociationInfo

Association information to other entitlements.

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

### hasAssociationInfo

### clearAssociationInfo

### setAssociationInfo

Association information to other entitlements.

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

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

### getParameters

Extended entitlement parameters. When creating an entitlement, valid
parameter names and values are defined in the
[Offer.parameter_definitions](https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Offer#_Google_Cloud_Channel_V1_Offer__getParameterDefinitions__).

For Google Workspace, the following Parameters may be accepted as input:

- max_units: The maximum assignable units for a flexible offer OR
- num_units: The total commitment for commitment-based offers The response may additionally include the following output-only Parameters:
- assigned_units: The number of licenses assigned to users. For Google Cloud billing subaccounts, the following Parameter may be accepted as input:
- display_name: The display name of the billing subaccount.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Parameter>` |   |

### setParameters

Extended entitlement parameters. When creating an entitlement, valid
parameter names and values are defined in the
[Offer.parameter_definitions](https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Offer#_Google_Cloud_Channel_V1_Offer__getParameterDefinitions__).

For Google Workspace, the following Parameters may be accepted as input:

- max_units: The maximum assignable units for a flexible offer OR
- num_units: The total commitment for commitment-based offers The response may additionally include the following output-only Parameters:
- assigned_units: The number of licenses assigned to users. For Google Cloud billing subaccounts, the following Parameter may be accepted as input:
- display_name: The display name of the billing subaccount.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-channel/latest/V1.Parameter>` |

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

### getBillingAccount

Optional. The billing account resource name that is used to pay for this
entitlement.

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

### setBillingAccount

Optional. The billing account resource name that is used to pay for this
entitlement.

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

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

### getPriceReferenceId

Optional. Price reference ID for the offer. Only for offers that require
additional price information. Used to guarantee that the pricing is
consistent between quoting the offer and placing the order.

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

### setPriceReferenceId

Optional. Price reference ID for the offer. Only for offers that require
additional price information. Used to guarantee that the pricing is
consistent between quoting the offer and placing the order.

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

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