Class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Insight

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recommender_v1/classes.rb,
lib/google/apis/recommender_v1/representations.rb,
lib/google/apis/recommender_v1/representations.rb

Overview

An insight along with the information used to derive the insight. The insight may have associated recommendations as well.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommenderV1Insight

Returns a new instance of GoogleCloudRecommenderV1Insight.



169
170
171
# File 'lib/google/apis/recommender_v1/classes.rb', line 169

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#associated_recommendationsArray<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightRecommendationReference>

Recommendations derived from this insight. Corresponds to the JSON property associatedRecommendations



108
109
110
# File 'lib/google/apis/recommender_v1/classes.rb', line 108

def associated_recommendations
  @associated_recommendations
end

#categoryString

Category being targeted by the insight. Corresponds to the JSON property category

Returns:

  • (String)


113
114
115
# File 'lib/google/apis/recommender_v1/classes.rb', line 113

def category
  @category
end

#contentHash<String,Object>

A struct of custom fields to explain the insight. Example: " grantedPermissionsCount": "1000" Corresponds to the JSON property content

Returns:

  • (Hash<String,Object>)


119
120
121
# File 'lib/google/apis/recommender_v1/classes.rb', line 119

def content
  @content
end

#descriptionString

Free-form human readable summary in English. The maximum length is 500 characters. Corresponds to the JSON property description

Returns:

  • (String)


125
126
127
# File 'lib/google/apis/recommender_v1/classes.rb', line 125

def description
  @description
end

#etagString

Fingerprint of the Insight. Provides optimistic locking when updating states. Corresponds to the JSON property etag

Returns:

  • (String)


130
131
132
# File 'lib/google/apis/recommender_v1/classes.rb', line 130

def etag
  @etag
end

#insight_subtypeString

Insight subtype. Insight content schema will be stable for a given subtype. Corresponds to the JSON property insightSubtype

Returns:

  • (String)


135
136
137
# File 'lib/google/apis/recommender_v1/classes.rb', line 135

def insight_subtype
  @insight_subtype
end

#last_refresh_timeString

Timestamp of the latest data used to generate the insight. Corresponds to the JSON property lastRefreshTime

Returns:

  • (String)


140
141
142
# File 'lib/google/apis/recommender_v1/classes.rb', line 140

def last_refresh_time
  @last_refresh_time
end

#nameString

Identifier. Name of the insight. Corresponds to the JSON property name

Returns:

  • (String)


145
146
147
# File 'lib/google/apis/recommender_v1/classes.rb', line 145

def name
  @name
end

#observation_periodString

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). Corresponds to the JSON property observationPeriod

Returns:

  • (String)


152
153
154
# File 'lib/google/apis/recommender_v1/classes.rb', line 152

def observation_period
  @observation_period
end

#severityString

Insight's severity. Corresponds to the JSON property severity

Returns:

  • (String)


157
158
159
# File 'lib/google/apis/recommender_v1/classes.rb', line 157

def severity
  @severity
end

#state_infoGoogle::Apis::RecommenderV1::GoogleCloudRecommenderV1InsightStateInfo

Information related to insight state. Corresponds to the JSON property stateInfo



162
163
164
# File 'lib/google/apis/recommender_v1/classes.rb', line 162

def state_info
  @state_info
end

#target_resourcesArray<String>

Fully qualified resource names that this insight is targeting. Corresponds to the JSON property targetResources

Returns:

  • (Array<String>)


167
168
169
# File 'lib/google/apis/recommender_v1/classes.rb', line 167

def target_resources
  @target_resources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/google/apis/recommender_v1/classes.rb', line 174

def update!(**args)
  @associated_recommendations = args[:associated_recommendations] if args.key?(:associated_recommendations)
  @category = args[:category] if args.key?(:category)
  @content = args[:content] if args.key?(:content)
  @description = args[:description] if args.key?(:description)
  @etag = args[:etag] if args.key?(:etag)
  @insight_subtype = args[:insight_subtype] if args.key?(:insight_subtype)
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
  @name = args[:name] if args.key?(:name)
  @observation_period = args[:observation_period] if args.key?(:observation_period)
  @severity = args[:severity] if args.key?(:severity)
  @state_info = args[:state_info] if args.key?(:state_info)
  @target_resources = args[:target_resources] if args.key?(:target_resources)
end