Reference documentation and code samples for the Recommender V1 Client class Insight.
An insight along with the information used to derive the insight. The insight may have associated recomendations as well.
Generated from protobuf message google.cloud.recommender.v1.Insight
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Name of the insight. |
↳ description |
string
Free-form human readable summary in English. The maximum length is 500 characters. |
↳ target_resources |
array
Fully qualified resource names that this insight is targeting. |
↳ insight_subtype |
string
Insight subtype. Insight content schema will be stable for a given subtype. |
↳ content |
Google\Protobuf\Struct
A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000" |
↳ last_refresh_time |
Google\Protobuf\Timestamp
Timestamp of the latest data used to generate the insight. |
↳ observation_period |
Google\Protobuf\Duration
Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period). |
↳ state_info |
Google\Cloud\Recommender\V1\InsightStateInfo
Information state and metadata. |
↳ category |
int
Category being targeted by the insight. |
↳ severity |
int
Insight's severity. |
↳ etag |
string
Fingerprint of the Insight. Provides optimistic locking when updating states. |
↳ associated_recommendations |
array<Google\Cloud\Recommender\V1\Insight\RecommendationReference>
Recommendations derived from this insight. |
getName
Name of the insight.
Returns | |
---|---|
Type | Description |
string |
setName
Name of the insight.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDescription
Free-form human readable summary in English. The maximum length is 500 characters.
Returns | |
---|---|
Type | Description |
string |
setDescription
Free-form human readable summary in English. The maximum length is 500 characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTargetResources
Fully qualified resource names that this insight is targeting.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setTargetResources
Fully qualified resource names that this insight is targeting.
Parameter | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getInsightSubtype
Insight subtype. Insight content schema will be stable for a given subtype.
Returns | |
---|---|
Type | Description |
string |
setInsightSubtype
Insight subtype. Insight content schema will be stable for a given subtype.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getContent
A struct of custom fields to explain the insight.
Example: "grantedPermissionsCount": "1000"
Returns | |
---|---|
Type | Description |
Google\Protobuf\Struct|null |
hasContent
clearContent
setContent
A struct of custom fields to explain the insight.
Example: "grantedPermissionsCount": "1000"
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Struct
|
Returns | |
---|---|
Type | Description |
$this |
getLastRefreshTime
Timestamp of the latest data used to generate the insight.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasLastRefreshTime
clearLastRefreshTime
setLastRefreshTime
Timestamp of the latest data used to generate the insight.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getObservationPeriod
Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
Returns | |
---|---|
Type | Description |
Google\Protobuf\Duration|null |
hasObservationPeriod
clearObservationPeriod
setObservationPeriod
Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Duration
|
Returns | |
---|---|
Type | Description |
$this |
getStateInfo
Information state and metadata.
Returns | |
---|---|
Type | Description |
Google\Cloud\Recommender\V1\InsightStateInfo|null |
hasStateInfo
clearStateInfo
setStateInfo
Information state and metadata.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Recommender\V1\InsightStateInfo
|
Returns | |
---|---|
Type | Description |
$this |
getCategory
Category being targeted by the insight.
Returns | |
---|---|
Type | Description |
int |
setCategory
Category being targeted by the insight.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getSeverity
Insight's severity.
Returns | |
---|---|
Type | Description |
int |
setSeverity
Insight's severity.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getEtag
Fingerprint of the Insight. Provides optimistic locking when updating states.
Returns | |
---|---|
Type | Description |
string |
setEtag
Fingerprint of the Insight. Provides optimistic locking when updating states.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getAssociatedRecommendations
Recommendations derived from this insight.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setAssociatedRecommendations
Recommendations derived from this insight.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Recommender\V1\Insight\RecommendationReference>
|
Returns | |
---|---|
Type | Description |
$this |