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 messagegoogle.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.
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
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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class UserLicense (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.UserLicense)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.UserLicense)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.UserLicense)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.UserLicense)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.UserLicense)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.UserLicense)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.UserLicense)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.UserLicense)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.UserLicense)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.UserLicense)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.UserLicense)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.UserLicense)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.UserLicense)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.UserLicense)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.UserLicense)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.UserLicense)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.UserLicense) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class UserLicense.\n\nUser License information assigned by the admin.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.UserLicense`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getUserPrincipal\n\nRequired. Immutable. The user principal of the User, could be email address\nor other prinical identifier. This field is immutable. Admin assign\nlicenses based on the user principal.\n\n### setUserPrincipal\n\nRequired. Immutable. The user principal of the User, could be email address\nor other prinical identifier. This field is immutable. Admin assign\nlicenses based on the user principal.\n\n### getUserProfile\n\nOptional. The user profile.\n\nWe user user full name(First name + Last name) as user profile.\n\n### setUserProfile\n\nOptional. The user profile.\n\nWe user user full name(First name + Last name) as user profile.\n\n### getLicenseAssignmentState\n\nOutput only. License assignment state of the user.\n\nIf the user is assigned with a license config, the user loggin will be\nassigned with the license;\nIf the user's license assignment state is unassigned or unspecified, no\nlicense config will be associated to the user;\n\n### setLicenseAssignmentState\n\nOutput only. License assignment state of the user.\n\nIf the user is assigned with a license config, the user loggin will be\nassigned with the license;\nIf the user's license assignment state is unassigned or unspecified, no\nlicense config will be associated to the user;\n\n### getLicenseConfig\n\nOptional. The full resource name of the Subscription(LicenseConfig)\nassigned to the user.\n\n### setLicenseConfig\n\nOptional. The full resource name of the Subscription(LicenseConfig)\nassigned to the user.\n\n### getCreateTime\n\nOutput only. User created timestamp.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. User created timestamp.\n\n### getUpdateTime\n\nOutput only. User update timestamp.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. User update timestamp.\n\n### getLastLoginTime\n\nOutput only. User last logged in time.\n\nIf the user has not logged in yet, this field will be empty.\n\n### hasLastLoginTime\n\n### clearLastLoginTime\n\n### setLastLoginTime\n\nOutput only. User last logged in time.\n\nIf the user has not logged in yet, this field will be empty."]]