Recommender V1 Client - Class Insight (1.10.0)

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 recommendations as well.

Generated from protobuf message google.cloud.recommender.v1.Insight

Namespace

Google \ Cloud \ Recommender \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
string

setName

Name of the insight.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

Free-form human readable summary in English. The maximum length is 500 characters.

Returns
TypeDescription
string

setDescription

Free-form human readable summary in English. The maximum length is 500 characters.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTargetResources

Fully qualified resource names that this insight is targeting.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTargetResources

Fully qualified resource names that this insight is targeting.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getInsightSubtype

Insight subtype. Insight content schema will be stable for a given subtype.

Returns
TypeDescription
string

setInsightSubtype

Insight subtype. Insight content schema will be stable for a given subtype.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getContent

A struct of custom fields to explain the insight.

Example: "grantedPermissionsCount": "1000"

Returns
TypeDescription
Google\Protobuf\Struct|null

hasContent

clearContent

setContent

A struct of custom fields to explain the insight.

Example: "grantedPermissionsCount": "1000"

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getLastRefreshTime

Timestamp of the latest data used to generate the insight.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasLastRefreshTime

clearLastRefreshTime

setLastRefreshTime

Timestamp of the latest data used to generate the insight.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getStateInfo

Information state and metadata.

Returns
TypeDescription
Google\Cloud\Recommender\V1\InsightStateInfo|null

hasStateInfo

clearStateInfo

setStateInfo

Information state and metadata.

Parameter
NameDescription
var Google\Cloud\Recommender\V1\InsightStateInfo
Returns
TypeDescription
$this

getCategory

Category being targeted by the insight.

Returns
TypeDescription
int

setCategory

Category being targeted by the insight.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSeverity

Insight's severity.

Returns
TypeDescription
int

setSeverity

Insight's severity.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getEtag

Fingerprint of the Insight. Provides optimistic locking when updating states.

Returns
TypeDescription
string

setEtag

Fingerprint of the Insight. Provides optimistic locking when updating states.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAssociatedRecommendations

Recommendations derived from this insight.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAssociatedRecommendations

Recommendations derived from this insight.

Parameter
NameDescription
var array<Google\Cloud\Recommender\V1\Insight\RecommendationReference>
Returns
TypeDescription
$this