# Google Cloud Discovery Engine V1 Client - Class UserLicense (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class UserLicense.

User License information assigned by the admin.

Generated from protobuf message `google.cloud.discoveryengine.v1.UserLicense`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ user_principal` | `string` Required. Immutable. The user principal of the User, could be email address or other prinical identifier. This field is immutable. Admin assign licenses based on the user principal. |
| `↳ user_profile` | `string` Optional. The user profile. We user user full name(First name + Last name) as user profile. |
| `↳ license_assignment_state` | `int` Output only. License assignment state of the user. If the user is assigned with a license config, the user loggin will be assigned with the license; If the user's license assignment state is unassigned or unspecified, no license config will be associated to the user; |
| `↳ license_config` | `string` Optional. The full resource name of the Subscription(LicenseConfig) assigned to the user. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. User created timestamp. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. User update timestamp. |
| `↳ last_login_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. User last logged in time. If the user has not logged in yet, this field will be empty. |

### getUserPrincipal

Required. Immutable. The user principal of the User, could be email address
or other prinical identifier. This field is immutable. Admin assign
licenses based on the user principal.

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

### setUserPrincipal

Required. Immutable. The user principal of the User, could be email address
or other prinical identifier. This field is immutable. Admin assign
licenses based on the user principal.

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

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

### getUserProfile

Optional. The user profile.

We user user full name(First name + Last name) as user profile.

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

### setUserProfile

Optional. The user profile.

We user user full name(First name + Last name) as user profile.

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

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

### getLicenseAssignmentState

Output only. License assignment state of the user.

If the user is assigned with a license config, the user loggin will be
assigned with the license;
If the user's license assignment state is unassigned or unspecified, no
license config will be associated to the user;

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

### setLicenseAssignmentState

Output only. License assignment state of the user.

If the user is assigned with a license config, the user loggin will be
assigned with the license;
If the user's license assignment state is unassigned or unspecified, no
license config will be associated to the user;

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

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

### getLicenseConfig

Optional. The full resource name of the Subscription(LicenseConfig)
assigned to the user.

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

### setLicenseConfig

Optional. The full resource name of the Subscription(LicenseConfig)
assigned to the user.

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

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

### getCreateTime

Output only. User created timestamp.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. User created timestamp.

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

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

### getUpdateTime

Output only. User update timestamp.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. User update timestamp.

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

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

### getLastLoginTime

Output only. User last logged in time.

If the user has not logged in yet, this field will be empty.

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

### hasLastLoginTime

### clearLastLoginTime

### setLastLoginTime

Output only. User last logged in time.

If the user has not logged in yet, this field will be empty.

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

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