NAME

Google::Cloud::Recommender::V1::Recommendation - Compiled Protocol Buffers messages for google/cloud/recommender/v1/recommendation.proto

SYNOPSIS

use Google::Cloud::Recommender::V1::Recommendation;

my $msg = Google::Cloud::Recommender::V1::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::V1::Recommendation::Recommendation->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/recommender/v1/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::V1::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: String

    Identifier. Name of recommendation.

  • $msg->description() / $msg->description($value)

    Type: String

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

  • $msg->recommender_subtype() / $msg->recommender_subtype($value)

    Type: String

    Contains 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::V1::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::V1::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::V1::Recommendation::Priority)

    Recommendation's priority.

  • $msg->content() / $msg->content($value)

    Type: Message (Google::Cloud::Recommender::V1::Recommendation::RecommendationContent)

    Content of the recommendation describing recommended changes to resources.

  • $msg->state_info() / $msg->state_info($value)

    Type: Message (Google::Cloud::Recommender::V1::Recommendation::RecommendationStateInfo)

    Information for state. Contains state and metadata.

  • $msg->etag() / $msg->etag($value)

    Type: String

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

  • $msg->associated_insights() / $msg->associated_insights($value)

    Type: Message (Google::Cloud::Recommender::V1::Recommendation::Recommendation::InsightReference)

    Insights that led to this recommendation.

  • $msg->xor_group_id() / $msg->xor_group_id($value)

    Type: String

    Corresponds 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.

  • $msg->target_resources() / $msg->target_resources($value)

    Type: String

    Fully qualified resource names that this recommendation is targeting.

Enum: Recommendation::Priority

  • PRIORITY_UNSPECIFIED => 0

  • P4 => 1

  • P3 => 2

  • P2 => 3

  • P1 => 4

Google::Cloud::Recommender::V1::Recommendation::RecommendationContent

Contains what resources are changing and how they are changing.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Recommender::V1::Recommendation::OperationGroup

Group of operations that need to be performed atomically.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Recommender::V1::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: String

    Type 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: String

    Type 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: String

    Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.

  • $msg->path() / $msg->path($value)

    Type: String

    Path 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: String

    Can 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: String

    Can 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::V1::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::V1::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::V1::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::V1::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: String

    To 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::V1::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.

  • $msg->cost_in_local_currency() / $msg->cost_in_local_currency($value)

    Type: Message (Google::Type::Money::Money)

    The approximate cost savings in the billing account's local currency.

Google::Cloud::Recommender::V1::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)

    Additional security impact details that is provided by the recommender.

Google::Cloud::Recommender::V1::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: Double

    Carbon 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 sustainability applies.

Google::Cloud::Recommender::V1::Recommendation::ReliabilityProjection

Contains information on the impact of a reliability recommendation.

Inherits from Protobuf::Message.

Accessors

Enum: ReliabilityProjection::RiskType

  • RISK_TYPE_UNSPECIFIED => 0

  • SERVICE_DISRUPTION => 1

  • DATA_LOSS => 2

  • ACCESS_DENY => 3

Google::Cloud::Recommender::V1::Recommendation::Impact

Contains the impact a recommendation can have for a given category.

Inherits from Protobuf::Message.

Accessors

Enum: Impact::Category

  • CATEGORY_UNSPECIFIED => 0

  • COST => 1

  • SECURITY => 2

  • PERFORMANCE => 3

  • MANAGEABILITY => 4

  • SUSTAINABILITY => 5

  • RELIABILITY => 6

Google::Cloud::Recommender::V1::Recommendation::RecommendationStateInfo

Information for state. Contains state and metadata.

Inherits from Protobuf::Message.

Accessors

Enum: RecommendationStateInfo::State

  • STATE_UNSPECIFIED => 0

  • ACTIVE => 1

  • CLAIMED => 6

  • SUCCEEDED => 3

  • FAILED => 4

  • DISMISSED => 5

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Recommender::V1::Recommendation::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.