NAME
Google::Cloud::Recommender::V1beta1::Recommendation - Compiled Protocol Buffers messages for google/cloud/recommender/v1beta1/recommendation.proto
SYNOPSIS
use Google::Cloud::Recommender::V1beta1::Recommendation;
my $msg = Google::Cloud::Recommender::V1beta1::Recommendation::Recommendation->new({
name => $name,
description => $description,
recommender_subtype => $recommender_subtype,
last_refresh_time => $last_refresh_time,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Recommender::V1beta1::Recommendation::Recommendation->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/recommender/v1beta1/recommendation.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Recommender::V1beta1::Recommendation::Recommendation
A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringName of recommendation.
$msg->description()/$msg->description($value)Type:
StringFree-form human readable summary in English. The maximum length is 500 characters.
$msg->recommender_subtype()/$msg->recommender_subtype($value)Type:
StringContains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender.
Examples: For recommender = "google.iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
$msg->last_refresh_time()/$msg->last_refresh_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Last time this recommendation was refreshed by the system that created it in the first place.
$msg->primary_impact()/$msg->primary_impact($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Impact)The primary impact that this recommendation can have while trying to optimize for one category.
$msg->additional_impact()/$msg->additional_impact($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Impact)Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
$msg->priority()/$msg->priority($value)Type:
Enum(Google::Cloud::Recommender::V1beta1::Recommendation::Priority)Recommendation's priority.
$msg->content()/$msg->content($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::RecommendationContent)Content of the recommendation describing recommended changes to resources.
$msg->state_info()/$msg->state_info($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::RecommendationStateInfo)Information for state. Contains state and metadata.
$msg->etag()/$msg->etag($value)Type:
StringFingerprint of the Recommendation. Provides optimistic locking when updating states.
$msg->associated_insights()/$msg->associated_insights($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Recommendation::InsightReference)Insights that led to this recommendation.
$msg->xor_group_id()/$msg->xor_group_id($value)Type:
StringCorresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.
Enum: Recommendation::Priority
PRIORITY_UNSPECIFIED=>0P4=>1P3=>2P2=>3P1=>4
Google::Cloud::Recommender::V1beta1::Recommendation::RecommendationContent
Contains what resources are changing and how they are changing.
Inherits from Protobuf::Message.
Accessors
$msg->operation_groups()/$msg->operation_groups($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::OperationGroup)Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.
$msg->overview()/$msg->overview($value)Type:
Message(Google::Protobuf::Struct::Struct)Condensed overview information about the recommendation.
Google::Cloud::Recommender::V1beta1::Recommendation::OperationGroup
Group of operations that need to be performed atomically.
Inherits from Protobuf::Message.
Accessors
$msg->operations()/$msg->operations($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Operation)List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.
Google::Cloud::Recommender::V1beta1::Recommendation::Operation
Contains an operation for a resource loosely based on the JSON-PATCH format with support for:
* Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
Inherits from Protobuf::Message.
Accessors
$msg->action()/$msg->action($value)Type:
StringType of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.
$msg->resource_type()/$msg->resource_type($value)Type:
StringType of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
$msg->resource()/$msg->resource($value)Type:
StringContains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
$msg->path()/$msg->path($value)Type:
StringPath to the target field being operated on. If the operation is at the resource level, then path should be "/". This field is always populated.
$msg->source_resource()/$msg->source_resource($value)Type:
StringCan be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = "/", from = "/", source_resource = <source> and resource_name = <target>. This field is empty for all other values of `action`.
$msg->source_path()/$msg->source_path($value)Type:
StringCan be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
$msg->value()/$msg->value($value)Type:
Message(Google::Protobuf::Struct::Value)Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.
$msg->value_matcher()/$msg->value_matcher($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::ValueMatcher)Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.
$msg->path_filters()/$msg->path_filters($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Operation::PathFiltersEntry)Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers.
* Example: ``` { "/versions/*/name" : "it-123" "/versions/*/targetSize/percent": 20 } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/condition" : null } ``` * Example: ``` { "/bindings/*/role": "roles/owner" "/bindings/*/members/*" : ["x@example.com", "y@example.com"] } ``` When both path_filters and path_value_matchers are set, an implicit AND must be performed.
$msg->path_value_matchers()/$msg->path_value_matchers($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::Operation::PathValueMatchersEntry)Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.
Google::Cloud::Recommender::V1beta1::Recommendation::ValueMatcher
Contains various matching options for values for a GCP resource field.
Inherits from Protobuf::Message.
Accessors
$msg->matches_pattern()/$msg->matches_pattern($value)Type:
StringTo be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch
Google::Cloud::Recommender::V1beta1::Recommendation::CostProjection
Contains metadata about how much money a recommendation can save or incur.
Inherits from Protobuf::Message.
Accessors
$msg->cost()/$msg->cost($value)Type:
Message(Google::Type::Money::Money)An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
A user's permissions may affect whether the cost is computed using list prices or custom contract prices.
$msg->duration()/$msg->duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Duration for which this cost applies.
Google::Cloud::Recommender::V1beta1::Recommendation::SecurityProjection
Contains various ways of describing the impact on Security.
Inherits from Protobuf::Message.
Accessors
$msg->details()/$msg->details($value)Type:
Message(Google::Protobuf::Struct::Struct)This field can be used by the recommender to define details specific to security impact.
Google::Cloud::Recommender::V1beta1::Recommendation::SustainabilityProjection
Contains metadata about how much sustainability a recommendation can save or incur.
Inherits from Protobuf::Message.
Accessors
$msg->kg_c_o2e()/$msg->kg_c_o2e($value)Type:
DoubleCarbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
$msg->duration()/$msg->duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Duration for which this sustanability applies.
Google::Cloud::Recommender::V1beta1::Recommendation::Impact
Contains the impact a recommendation can have for a given category.
Inherits from Protobuf::Message.
Accessors
$msg->category()/$msg->category($value)Type:
Enum(Google::Cloud::Recommender::V1beta1::Impact::Category)Category that is being targeted.
$msg->cost_projection()/$msg->cost_projection($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::CostProjection)Use with CategoryType.COST
$msg->security_projection()/$msg->security_projection($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::SecurityProjection)Use with CategoryType.SECURITY
$msg->sustainability_projection()/$msg->sustainability_projection($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::SustainabilityProjection)Use with CategoryType.SUSTAINABILITY
Enum: Impact::Category
CATEGORY_UNSPECIFIED=>0COST=>1SECURITY=>2PERFORMANCE=>3MANAGEABILITY=>4SUSTAINABILITY=>5
Google::Cloud::Recommender::V1beta1::Recommendation::RecommendationStateInfo
Information for state. Contains state and metadata.
Inherits from Protobuf::Message.
Accessors
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Recommender::V1beta1::RecommendationStateInfo::State)The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
$msg->state_metadata()/$msg->state_metadata($value)Type:
Message(Google::Cloud::Recommender::V1beta1::Recommendation::RecommendationStateInfo::StateMetadataEntry)A map of metadata for the state, provided by user or automations systems.
Enum: RecommendationStateInfo::State
STATE_UNSPECIFIED=>0ACTIVE=>1CLAIMED=>6SUCCEEDED=>3FAILED=>4DISMISSED=>5
Google::Cloud::Recommender::V1beta1::Recommendation::RecommenderType
The type of a recommender.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe recommender's name in format RecommenderTypes/{recommender_type} eg: recommenderTypes/google.iam.policy.Recommender
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Recommender::V1beta1::Recommendation::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.