From edc2af793ea7124c17fb98e591ffed9dc3655641 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 06:26:02 -0800 Subject: [PATCH] feat: Support cost_in_local_currency field in the cost projection (#6866) docs: Fix typo for the comment of reliability_projection docs: Add comment for targetResources PiperOrigin-RevId: 589982370 Source-Link: https://github.com/googleapis/googleapis/commit/b7abf5c7949ac890bb5c5f9810a8e7ee4fec85f5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1617d1ede2a05c13289cfea4883bcdf9116f564e Copy-Tag: eyJwIjoiUmVjb21tZW5kZXIvLk93bEJvdC55YW1sIiwiaCI6IjE2MTdkMWVkZTJhMDVjMTMyODljZmVhNDg4M2JjZGY5MTE2ZjU2NGUifQ== --- Recommender/metadata/V1/Recommendation.php | Bin 5003 -> 5056 bytes Recommender/src/V1/CostProjection.php | 44 ++++++++++++++++++ .../src/V1/Gapic/RecommenderGapicClient.php | 16 ++++++- Recommender/src/V1/Impact.php | 6 +-- Recommender/src/V1/ListInsightsRequest.php | 16 +++++++ .../src/V1/ListRecommendationsRequest.php | 23 +++++++++ .../V1/MarkRecommendationDismissedRequest.php | 8 ++-- 7 files changed, 105 insertions(+), 8 deletions(-) diff --git a/Recommender/metadata/V1/Recommendation.php b/Recommender/metadata/V1/Recommendation.php index cd1ca3eb685f0a2631f80491cfbf0475008a9477..f3d0e874402d694acf945e83290e6e7f04a24a64 100644 GIT binary patch delta 79 zcmeBHKcK#Wotg3DW)9~2988lLC%@p1HxV-85=+i6E{V^~i_ghVPRxluQsVqp<^Ucpot=#O+.google.protobuf.Duration duration = 2; */ private $duration = null; + /** + * The approximate cost savings in the billing account's local currency. + * + * Generated from protobuf field .google.type.Money cost_in_local_currency = 3; + */ + private $cost_in_local_currency = null; /** * Constructor. @@ -46,6 +52,8 @@ class CostProjection extends \Google\Protobuf\Internal\Message * prices or custom contract prices. * @type \Google\Protobuf\Duration $duration * Duration for which this cost applies. + * @type \Google\Type\Money $cost_in_local_currency + * The approximate cost savings in the billing account's local currency. * } */ public function __construct($data = NULL) { @@ -133,5 +141,41 @@ public function setDuration($var) return $this; } + /** + * The approximate cost savings in the billing account's local currency. + * + * Generated from protobuf field .google.type.Money cost_in_local_currency = 3; + * @return \Google\Type\Money|null + */ + public function getCostInLocalCurrency() + { + return $this->cost_in_local_currency; + } + + public function hasCostInLocalCurrency() + { + return isset($this->cost_in_local_currency); + } + + public function clearCostInLocalCurrency() + { + unset($this->cost_in_local_currency); + } + + /** + * The approximate cost savings in the billing account's local currency. + * + * Generated from protobuf field .google.type.Money cost_in_local_currency = 3; + * @param \Google\Type\Money $var + * @return $this + */ + public function setCostInLocalCurrency($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->cost_in_local_currency = $var; + + return $this; + } + } diff --git a/Recommender/src/V1/Gapic/RecommenderGapicClient.php b/Recommender/src/V1/Gapic/RecommenderGapicClient.php index 77ddf9b91c97..fead5d7c676d 100644 --- a/Recommender/src/V1/Gapic/RecommenderGapicClient.php +++ b/Recommender/src/V1/Gapic/RecommenderGapicClient.php @@ -1395,6 +1395,8 @@ public function getRecommenderConfig($name, array $optionalArgs = []) * * * `severity` * + * * `targetResources` + * * Examples: * * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` @@ -1403,8 +1405,13 @@ public function getRecommenderConfig($name, array $optionalArgs = []) * * * `severity = CRITICAL OR severity = HIGH` * + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` + * * * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` * + * The max allowed filter length is 500 characters. + * * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @type RetrySettings|array $retrySettings @@ -1506,6 +1513,8 @@ public function listInsights($parent, array $optionalArgs = []) * * * `priority` * + * * `targetResources` + * * Examples: * * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` @@ -1514,8 +1523,13 @@ public function listInsights($parent, array $optionalArgs = []) * * * `priority = P1 OR priority = P2` * + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` + * * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` * + * The max allowed filter length is 500 characters. + * * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @type RetrySettings|array $retrySettings @@ -1687,7 +1701,7 @@ public function markRecommendationClaimed($name, $etag, array $optionalArgs = [] * } * ``` * - * @param string $name Name of the recommendation. + * @param string $name Required. Name of the recommendation. * @param array $optionalArgs { * Optional. * diff --git a/Recommender/src/V1/Impact.php b/Recommender/src/V1/Impact.php index 4e30a0fa2aee..f543dfcc01d0 100644 --- a/Recommender/src/V1/Impact.php +++ b/Recommender/src/V1/Impact.php @@ -38,7 +38,7 @@ class Impact extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Recommender\V1\SustainabilityProjection $sustainability_projection * Use with CategoryType.SUSTAINABILITY * @type \Google\Cloud\Recommender\V1\ReliabilityProjection $reliability_projection - * Use with CategoryType.RELAIBILITY + * Use with CategoryType.RELIABILITY * } */ public function __construct($data = NULL) { @@ -166,7 +166,7 @@ public function setSustainabilityProjection($var) } /** - * Use with CategoryType.RELAIBILITY + * Use with CategoryType.RELIABILITY * * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; * @return \Google\Cloud\Recommender\V1\ReliabilityProjection|null @@ -182,7 +182,7 @@ public function hasReliabilityProjection() } /** - * Use with CategoryType.RELAIBILITY + * Use with CategoryType.RELIABILITY * * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; * @param \Google\Cloud\Recommender\V1\ReliabilityProjection $var diff --git a/Recommender/src/V1/ListInsightsRequest.php b/Recommender/src/V1/ListInsightsRequest.php index 6a3139172c36..9c91191cbefb 100644 --- a/Recommender/src/V1/ListInsightsRequest.php +++ b/Recommender/src/V1/ListInsightsRequest.php @@ -54,11 +54,15 @@ class ListInsightsRequest extends \Google\Protobuf\Internal\Message * * `stateInfo.state` * * `insightSubtype` * * `severity` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `insightSubtype = PERMISSIONS_USAGE` * * `severity = CRITICAL OR severity = HIGH` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @@ -129,11 +133,15 @@ public static function build(string $parent): self * * `stateInfo.state` * * `insightSubtype` * * `severity` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `insightSubtype = PERMISSIONS_USAGE` * * `severity = CRITICAL OR severity = HIGH` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * } @@ -257,11 +265,15 @@ public function setPageToken($var) * * `stateInfo.state` * * `insightSubtype` * * `severity` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `insightSubtype = PERMISSIONS_USAGE` * * `severity = CRITICAL OR severity = HIGH` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @@ -279,11 +291,15 @@ public function getFilter() * * `stateInfo.state` * * `insightSubtype` * * `severity` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `insightSubtype = PERMISSIONS_USAGE` * * `severity = CRITICAL OR severity = HIGH` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * diff --git a/Recommender/src/V1/ListRecommendationsRequest.php b/Recommender/src/V1/ListRecommendationsRequest.php index 8c53a3a2c85f..6dc39eb9f748 100644 --- a/Recommender/src/V1/ListRecommendationsRequest.php +++ b/Recommender/src/V1/ListRecommendationsRequest.php @@ -54,11 +54,15 @@ class ListRecommendationsRequest extends \Google\Protobuf\Internal\Message * * `state_info.state` * * `recommenderSubtype` * * `priority` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * * `priority = P1 OR priority = P2` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @@ -124,6 +128,8 @@ public static function build(string $parent): self * * * `priority` * + * * `targetResources` + * * Examples: * * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` @@ -132,8 +138,13 @@ public static function build(string $parent): self * * * `priority = P1 OR priority = P2` * + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` + * * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` * + * The max allowed filter length is 500 characters. + * * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @@ -181,11 +192,15 @@ public static function buildFromParentFilter(string $parent, string $filter): se * * `state_info.state` * * `recommenderSubtype` * * `priority` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * * `priority = P1 OR priority = P2` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * } @@ -309,11 +324,15 @@ public function setPageToken($var) * * `state_info.state` * * `recommenderSubtype` * * `priority` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * * `priority = P1 OR priority = P2` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * @@ -331,11 +350,15 @@ public function getFilter() * * `state_info.state` * * `recommenderSubtype` * * `priority` + * * `targetResources` * Examples: * * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * * `priority = P1 OR priority = P2` + * * `targetResources : + * //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` + * The max allowed filter length is 500 characters. * (These expressions are based on the filter language described at * https://google.aip.dev/160) * diff --git a/Recommender/src/V1/MarkRecommendationDismissedRequest.php b/Recommender/src/V1/MarkRecommendationDismissedRequest.php index ee93ee6af280..f502aa807e6f 100644 --- a/Recommender/src/V1/MarkRecommendationDismissedRequest.php +++ b/Recommender/src/V1/MarkRecommendationDismissedRequest.php @@ -16,7 +16,7 @@ class MarkRecommendationDismissedRequest extends \Google\Protobuf\Internal\Message { /** - * Name of the recommendation. + * Required. Name of the recommendation. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -35,7 +35,7 @@ class MarkRecommendationDismissedRequest extends \Google\Protobuf\Internal\Messa * Optional. Data for populating the Message object. * * @type string $name - * Name of the recommendation. + * Required. Name of the recommendation. * @type string $etag * Fingerprint of the Recommendation. Provides optimistic locking. * } @@ -46,7 +46,7 @@ public function __construct($data = NULL) { } /** - * Name of the recommendation. + * Required. Name of the recommendation. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -57,7 +57,7 @@ public function getName() } /** - * Name of the recommendation. + * Required. Name of the recommendation. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var