From 1da860835aae5913d04f906cadf794aef79022c1 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 28 May 2026 23:09:47 +0000 Subject: [PATCH 1/2] feat: Support utilization insights and cloud hub docs: Add identifier annotation for field name PiperOrigin-RevId: 922901240 Source-Link: https://github.com/googleapis/googleapis/commit/1676bd0af0bf0dee8f9b3855ac6abab7b7a580bc Source-Link: https://github.com/googleapis/googleapis-gen/commit/422deb2d32c0bd1757d5e618a52c66876959750f Copy-Tag: eyJwIjoiUmVjb21tZW5kZXIvLk93bEJvdC55YW1sIiwiaCI6IjQyMmRlYjJkMzJjMGJkMTc1N2Q1ZTYxOGE1MmM2Njg3Njk1OTc1MGYifQ== --- .../Google/Cloud/Recommender/V1/Insight.php | 29 + .../Recommender/V1/InsightTypeConfig.php | 28 + .../Cloud/Recommender/V1/Recommendation.php | 30 + .../Recommender/V1/RecommenderConfig.php | 28 + .../Recommender/V1/RecommenderService.php | 33 + .../Cloud/Recommender/V1/CostProjection.php | 181 +++ .../Recommender/V1/GetInsightRequest.php | 81 ++ .../V1/GetInsightTypeConfigRequest.php | 111 ++ .../V1/GetRecommendationRequest.php | 81 ++ .../V1/GetRecommenderConfigRequest.php | 111 ++ .../Google/Cloud/Recommender/V1/Impact.php | 242 ++++ .../Cloud/Recommender/V1/Impact/Category.php | 89 ++ .../Google/Cloud/Recommender/V1/Insight.php | 502 +++++++ .../Cloud/Recommender/V1/Insight/Category.php | 89 ++ .../V1/Insight/RecommendationReference.php | 71 + .../Cloud/Recommender/V1/Insight/Severity.php | 75 + .../Cloud/Recommender/V1/InsightStateInfo.php | 101 ++ .../Recommender/V1/InsightStateInfo/State.php | 74 + .../Recommender/V1/InsightTypeConfig.php | 347 +++++ .../V1/InsightTypeGenerationConfig.php | 83 ++ .../Recommender/V1/ListInsightsRequest.php | 319 +++++ .../Recommender/V1/ListInsightsResponse.php | 105 ++ .../V1/ListRecommendationsRequest.php | 378 +++++ .../V1/ListRecommendationsResponse.php | 105 ++ .../V1/MarkInsightAcceptedRequest.php | 158 +++ .../V1/MarkRecommendationClaimedRequest.php | 168 +++ .../V1/MarkRecommendationDismissedRequest.php | 101 ++ .../V1/MarkRecommendationFailedRequest.php | 168 +++ .../V1/MarkRecommendationSucceededRequest.php | 168 +++ .../Google/Cloud/Recommender/V1/Operation.php | 564 ++++++++ .../Cloud/Recommender/V1/OperationGroup.php | 71 + .../Cloud/Recommender/V1/Recommendation.php | 580 ++++++++ .../V1/Recommendation/InsightReference.php | 71 + .../V1/Recommendation/Priority.php | 75 + .../Recommender/V1/RecommendationContent.php | 119 ++ .../V1/RecommendationStateInfo.php | 101 ++ .../V1/RecommendationStateInfo/State.php | 92 ++ .../Recommender/V1/RecommenderConfig.php | 347 +++++ .../V1/RecommenderGenerationConfig.php | 83 ++ .../Recommender/V1/ReliabilityProjection.php | 111 ++ .../V1/ReliabilityProjection/RiskType.php | 69 + .../Recommender/V1/SecurityProjection.php | 77 ++ .../V1/SustainabilityProjection.php | 116 ++ .../V1/UpdateInsightTypeConfigRequest.php | 174 +++ .../V1/UpdateRecommenderConfigRequest.php | 174 +++ .../Cloud/Recommender/V1/ValueMatcher.php | 81 ++ .../V1/RecommenderClient/get_insight.php | 77 ++ .../get_insight_type_config.php | 86 ++ .../RecommenderClient/get_recommendation.php | 77 ++ .../get_recommender_config.php | 86 ++ .../V1/RecommenderClient/list_insights.php | 93 ++ .../list_recommendations.php | 93 ++ .../mark_insight_accepted.php | 84 ++ .../mark_recommendation_claimed.php | 88 ++ .../mark_recommendation_dismissed.php | 84 ++ .../mark_recommendation_failed.php | 89 ++ .../mark_recommendation_succeeded.php | 89 ++ .../update_insight_type_config.php | 60 + .../update_recommender_config.php | 60 + .../v1/src/V1/Client/RecommenderClient.php | 1211 +++++++++++++++++ .../Recommender/v1/src/V1/gapic_metadata.json | 83 ++ .../resources/recommender_client_config.json | 110 ++ .../recommender_descriptor_config.php | 232 ++++ .../recommender_rest_client_config.php | 366 +++++ .../Unit/V1/Client/RecommenderClientTest.php | 1062 +++++++++++++++ 65 files changed, 11091 insertions(+) create mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php create mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php create mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php create mode 100644 owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php create mode 100644 owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json create mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php create mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php create mode 100644 owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php new file mode 100644 index 000000000000..ac87631fe455 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xD3\x11\x0A)google/cloud/recommender/v1/insight.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE1\x09\x0A\x07Insight\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x09 \x03(\x09\x12\x17\x0A\x0Finsight_subtype\x18\x0A \x01(\x09\x12(\x0A\x07content\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x12observation_period\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x0Astate_info\x18\x06 \x01(\x0B2-.google.cloud.recommender.v1.InsightStateInfo\x12?\x0A\x08category\x18\x07 \x01(\x0E2-.google.cloud.recommender.v1.Insight.Category\x12?\x0A\x08severity\x18\x0F \x01(\x0E2-.google.cloud.recommender.v1.Insight.Severity\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12`\x0A\x1Aassociated_recommendations\x18\x08 \x03(\x0B2<.google.cloud.recommender.v1.Insight.RecommendationReference\x1A1\x0A\x17RecommendationReference\x12\x16\x0A\x0Erecommendation\x18\x01 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06\"Q\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x07\x0A\x03LOW\x10\x01\x12\x0A\x0A\x06MEDIUM\x10\x02\x12\x08\x0A\x04HIGH\x10\x03\x12\x0C\x0A\x08CRITICAL\x10\x04:\x9F\x03\xEAA\x9B\x03\x0A\"recommender.googleapis.com/Insight\x12Vprojects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12ebillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12Tfolders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12`organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\"\xAF\x02\x0A\x10InsightStateInfo\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.recommender.v1.InsightStateInfo.State\x12X\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2@.google.cloud.recommender.v1.InsightStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08ACCEPTED\x10\x02\x12\x0D\x0A\x09DISMISSED\x10\x03B\xF0\x03\x0A\x1Fcom.google.cloud.recommender.v1B\x0CInsightProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xD3\x02\x0A&recommender.googleapis.com/InsightType\x12Cprojects/{project}/locations/{location}/insightTypes/{insight_type}\x12RbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}\x12Afolders/{folder}/locations/{location}/insightTypes/{insight_type}\x12Morganizations/{organization}/locations/{location}/insightTypes/{insight_type}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php new file mode 100644 index 000000000000..4e0a74c77d3d --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xDD\x08\x0A5google/cloud/recommender/v1/insight_type_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB6\x05\x0A\x11InsightTypeConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12`\x0A\x1Einsight_type_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.InsightTypeGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.InsightTypeConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAF\x02\xEAA\xAB\x02\x0A,recommender.googleapis.com/InsightTypeConfig\x12Jprojects/{project}/locations/{location}/insightTypes/{insight_type}/config\x12Torganizations/{organization}/locations/{location}/insightTypes/{insight_type}/config\x12YbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config\"F\x0A\x1BInsightTypeGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16InsightTypeConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php new file mode 100644 index 000000000000..2815d94b3534 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xBC!\x0A0google/cloud/recommender/v1/recommendation.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xC1\x09\x0A\x0ERecommendation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x1B\x0A\x13recommender_subtype\x18\x0C \x01(\x09\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12;\x0A\x0Eprimary_impact\x18\x05 \x01(\x0B2#.google.cloud.recommender.v1.Impact\x12>\x0A\x11additional_impact\x18\x06 \x03(\x0B2#.google.cloud.recommender.v1.Impact\x12F\x0A\x08priority\x18\x11 \x01(\x0E24.google.cloud.recommender.v1.Recommendation.Priority\x12C\x0A\x07content\x18\x07 \x01(\x0B22.google.cloud.recommender.v1.RecommendationContent\x12H\x0A\x0Astate_info\x18\x0A \x01(\x0B24.google.cloud.recommender.v1.RecommendationStateInfo\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12Y\x0A\x13associated_insights\x18\x0E \x03(\x0B2<.google.cloud.recommender.v1.Recommendation.InsightReference\x12\x14\x0A\x0Cxor_group_id\x18\x12 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x13 \x03(\x09\x1A#\x0A\x10InsightReference\x12\x0F\x0A\x07insight\x18\x01 \x01(\x09\"D\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P4\x10\x01\x12\x06\x0A\x02P3\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P1\x10\x04:\xDA\x03\xEAA\xD6\x03\x0A)recommender.googleapis.com/Recommendation\x12cprojects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12rbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12afolders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12morganizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\"\x89\x01\x0A\x15RecommendationContent\x12E\x0A\x10operation_groups\x18\x02 \x03(\x0B2+.google.cloud.recommender.v1.OperationGroup\x12)\x0A\x08overview\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\"L\x0A\x0EOperationGroup\x12:\x0A\x0Aoperations\x18\x01 \x03(\x0B2&.google.cloud.recommender.v1.Operation\"\xD7\x04\x0A\x09Operation\x12\x0E\x0A\x06action\x18\x01 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x03 \x01(\x09\x12\x0C\x0A\x04path\x18\x04 \x01(\x09\x12\x17\x0A\x0Fsource_resource\x18\x05 \x01(\x09\x12\x13\x0A\x0Bsource_path\x18\x06 \x01(\x09\x12'\x0A\x05value\x18\x07 \x01(\x0B2\x16.google.protobuf.ValueH\x00\x12B\x0A\x0Dvalue_matcher\x18\x0A \x01(\x0B2).google.cloud.recommender.v1.ValueMatcherH\x00\x12M\x0A\x0Cpath_filters\x18\x08 \x03(\x0B27.google.cloud.recommender.v1.Operation.PathFiltersEntry\x12Z\x0A\x13path_value_matchers\x18\x0B \x03(\x0B2=.google.cloud.recommender.v1.Operation.PathValueMatchersEntry\x1AJ\x0A\x10PathFiltersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12%\x0A\x05value\x18\x02 \x01(\x0B2\x16.google.protobuf.Value:\x028\x01\x1Ac\x0A\x16PathValueMatchersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.recommender.v1.ValueMatcher:\x028\x01B\x0C\x0A\x0Apath_value\":\x0A\x0CValueMatcher\x12\x19\x0A\x0Fmatches_pattern\x18\x01 \x01(\x09H\x00B\x0F\x0A\x0Dmatch_variant\"\x93\x01\x0A\x0ECostProjection\x12 \x0A\x04cost\x18\x01 \x01(\x0B2\x12.google.type.Money\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x122\x0A\x16cost_in_local_currency\x18\x03 \x01(\x0B2\x12.google.type.Money\">\x0A\x12SecurityProjection\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"Y\x0A\x18SustainabilityProjection\x12\x10\x0A\x08kg_c_o2e\x18\x01 \x01(\x01\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xEC\x01\x0A\x15ReliabilityProjection\x12J\x0A\x05risks\x18\x01 \x03(\x0E2;.google.cloud.recommender.v1.ReliabilityProjection.RiskType\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"]\x0A\x08RiskType\x12\x19\x0A\x15RISK_TYPE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12SERVICE_DISRUPTION\x10\x01\x12\x0D\x0A\x09DATA_LOSS\x10\x02\x12\x0F\x0A\x0BACCESS_DENY\x10\x03\"\xB9\x04\x0A\x06Impact\x12>\x0A\x08category\x18\x01 \x01(\x0E2,.google.cloud.recommender.v1.Impact.Category\x12F\x0A\x0Fcost_projection\x18d \x01(\x0B2+.google.cloud.recommender.v1.CostProjectionH\x00\x12N\x0A\x13security_projection\x18e \x01(\x0B2/.google.cloud.recommender.v1.SecurityProjectionH\x00\x12Z\x0A\x19sustainability_projection\x18f \x01(\x0B25.google.cloud.recommender.v1.SustainabilityProjectionH\x00\x12T\x0A\x16reliability_projection\x18g \x01(\x0B22.google.cloud.recommender.v1.ReliabilityProjectionH\x00\x12\x0F\x0A\x07service\x18\x03 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06B\x0C\x0A\x0Aprojection\"\xDE\x02\x0A\x17RecommendationStateInfo\x12I\x0A\x05state\x18\x01 \x01(\x0E2:.google.cloud.recommender.v1.RecommendationStateInfo.State\x12_\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2G.google.cloud.recommender.v1.RecommendationStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0B\x0A\x07CLAIMED\x10\x06\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09DISMISSED\x10\x05B\xDE\x03\x0A\x1Fcom.google.cloud.recommender.v1P\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xCF\x02\x0A&recommender.googleapis.com/Recommender\x12Bprojects/{project}/locations/{location}/recommenders/{recommender}\x12QbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}\x12@folders/{folder}/locations/{location}/recommenders/{recommender}\x12Lorganizations/{organization}/locations/{location}/recommenders/{recommender}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php new file mode 100644 index 000000000000..0e760422b7b9 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xD8\x08\x0A4google/cloud/recommender/v1/recommender_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB2\x05\x0A\x11RecommenderConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12_\x0A\x1Drecommender_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.RecommenderGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.RecommenderConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAC\x02\xEAA\xA8\x02\x0A,recommender.googleapis.com/RecommenderConfig\x12Iprojects/{project}/locations/{location}/recommenders/{recommender}/config\x12Sorganizations/{organization}/locations/{location}/recommenders/{recommender}/config\x12XbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config\"F\x0A\x1BRecommenderGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16RecommenderConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php new file mode 100644 index 000000000000..56841d8852c2 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xF3F\x0A5google/cloud/recommender/v1/recommender_service.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/recommender/v1/insight.proto\x1A5google/cloud/recommender/v1/insight_type_config.proto\x1A0google/cloud/recommender/v1/recommendation.proto\x1A4google/cloud/recommender/v1/recommender_config.proto\x1A google/protobuf/field_mask.proto\"\x9B\x01\x0A\x13ListInsightsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&recommender.googleapis.com/InsightType\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"g\x0A\x14ListInsightsResponse\x126\x0A\x08insights\x18\x01 \x03(\x0B2\$.google.cloud.recommender.v1.Insight\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"M\x0A\x11GetInsightRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"recommender.googleapis.com/Insight\"\x88\x02\x0A\x1AMarkInsightAcceptedRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"recommender.googleapis.com/Insight\x12g\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2J.google.cloud.recommender.v1.MarkInsightAcceptedRequest.StateMetadataEntryB\x03\xE0A\x01\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x9D\x01\x0A\x1AListRecommendationsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&recommender.googleapis.com/Recommender\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"|\x0A\x1BListRecommendationsResponse\x12D\x0A\x0Frecommendations\x18\x01 \x03(\x0B2+.google.cloud.recommender.v1.Recommendation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x18GetRecommendationRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\"s\x0A\"MarkRecommendationDismissedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12\x0C\x0A\x04etag\x18\x02 \x01(\x09\"\x96\x02\x0A MarkRecommendationClaimedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12h\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2P.google.cloud.recommender.v1.MarkRecommendationClaimedRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x9A\x02\x0A\"MarkRecommendationSucceededRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12j\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2R.google.cloud.recommender.v1.MarkRecommendationSucceededRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x94\x02\x0A\x1FMarkRecommendationFailedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12g\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2O.google.cloud.recommender.v1.MarkRecommendationFailedRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x1BGetRecommenderConfigRequest\x12B\x0A\x04name\x18\x01 \x01(\x09B4\xE0A\x02\xFAA.\x0A,recommender.googleapis.com/RecommenderConfig\"\xB9\x01\x0A\x1EUpdateRecommenderConfigRequest\x12O\x0A\x12recommender_config\x18\x01 \x01(\x0B2..google.cloud.recommender.v1.RecommenderConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12\x15\x0A\x0Dvalidate_only\x18\x03 \x01(\x08\"a\x0A\x1BGetInsightTypeConfigRequest\x12B\x0A\x04name\x18\x01 \x01(\x09B4\xE0A\x02\xFAA.\x0A,recommender.googleapis.com/InsightTypeConfig\"\xBA\x01\x0A\x1EUpdateInsightTypeConfigRequest\x12P\x0A\x13insight_type_config\x18\x01 \x01(\x0B2..google.cloud.recommender.v1.InsightTypeConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12\x15\x0A\x0Dvalidate_only\x18\x03 \x01(\x082\xD6.\x0A\x0BRecommender\x12\x8B\x03\x0A\x0CListInsights\x120.google.cloud.recommender.v1.ListInsightsRequest\x1A1.google.cloud.recommender.v1.ListInsightsResponse\"\x95\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x85\x02\x12;/v1/{parent=projects/*/locations/*/insightTypes/*}/insightsZD\x12B/v1/{parent=billingAccounts/*/locations/*/insightTypes/*}/insightsZ<\x12:/v1/{parent=folders/*/locations/*/insightTypes/*}/insightsZB\x12@/v1/{parent=organizations/*/locations/*/insightTypes/*}/insights\x12\xF8\x02\x0A\x0AGetInsight\x12..google.cloud.recommender.v1.GetInsightRequest\x1A\$.google.cloud.recommender.v1.Insight\"\x93\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\x85\x02\x12;/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}ZD\x12B/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}Z<\x12:/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}ZB\x12@/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}\x12\xDE\x03\x0A\x13MarkInsightAccepted\x127.google.cloud.recommender.v1.MarkInsightAcceptedRequest\x1A\$.google.cloud.recommender.v1.Insight\"\xE7\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xC5\x02\"H/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZT\"O/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZL\"G/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZR\"M/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*\x12\xCC\x03\x0A\x13ListRecommendations\x127.google.cloud.recommender.v1.ListRecommendationsRequest\x1A8.google.cloud.recommender.v1.ListRecommendationsResponse\"\xC1\x02\xDAA\x06parent\xDAA\x0Dparent,filter\x82\xD3\xE4\x93\x02\xA1\x02\x12B/v1/{parent=projects/*/locations/*/recommenders/*}/recommendationsZK\x12I/v1/{parent=billingAccounts/*/locations/*/recommenders/*}/recommendationsZC\x12A/v1/{parent=folders/*/locations/*/recommenders/*}/recommendationsZI\x12G/v1/{parent=organizations/*/locations/*/recommenders/*}/recommendations\x12\xA9\x03\x0A\x11GetRecommendation\x125.google.cloud.recommender.v1.GetRecommendationRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xAF\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\xA1\x02\x12B/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}ZK\x12I/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}ZC\x12A/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}ZI\x12G/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}\x12\xFA\x03\x0A\x1BMarkRecommendationDismissed\x12?.google.cloud.recommender.v1.MarkRecommendationDismissedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xEC\x02\x82\xD3\xE4\x93\x02\xE5\x02\"P/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*Z\\\"W/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*ZT\"O/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*ZZ\"U/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*\x12\x89\x04\x0A\x19MarkRecommendationClaimed\x12=.google.cloud.recommender.v1.MarkRecommendationClaimedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xFF\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xDD\x02\"N/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZZ\"U/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZR\"M/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZX\"S/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*\x12\x95\x04\x0A\x1BMarkRecommendationSucceeded\x12?.google.cloud.recommender.v1.MarkRecommendationSucceededRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\x87\x03\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xE5\x02\"P/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*Z\\\"W/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*ZT\"O/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*ZZ\"U/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*\x12\x83\x04\x0A\x18MarkRecommendationFailed\x12<.google.cloud.recommender.v1.MarkRecommendationFailedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xFB\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xD9\x02\"M/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZY\"T/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZQ\"L/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZW\"R/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*\x12\xCC\x02\x0A\x14GetRecommenderConfig\x128.google.cloud.recommender.v1.GetRecommenderConfigRequest\x1A..google.cloud.recommender.v1.RecommenderConfig\"\xC9\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xBB\x01\x127/v1/{name=projects/*/locations/*/recommenders/*/config}Z>\x12/v1/{name=billingAccounts/*/locations/*/recommenders/*/config}\x12\xE1\x03\x0A\x17UpdateRecommenderConfig\x12;.google.cloud.recommender.v1.UpdateRecommenderConfigRequest\x1A..google.cloud.recommender.v1.RecommenderConfig\"\xD8\x02\xDAA\x1Erecommender_config,update_mask\x82\xD3\xE4\x93\x02\xB0\x022J/v1/{recommender_config.name=projects/*/locations/*/recommenders/*/config}:\x12recommender_configZe2O/v1/{recommender_config.name=organizations/*/locations/*/recommenders/*/config}:\x12recommender_configZg2Q/v1/{recommender_config.name=billingAccounts/*/locations/*/recommenders/*/config}:\x12recommender_config\x12\xCC\x02\x0A\x14GetInsightTypeConfig\x128.google.cloud.recommender.v1.GetInsightTypeConfigRequest\x1A..google.cloud.recommender.v1.InsightTypeConfig\"\xC9\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xBB\x01\x127/v1/{name=projects/*/locations/*/insightTypes/*/config}Z>\x12/v1/{name=billingAccounts/*/locations/*/insightTypes/*/config}\x12\xE8\x03\x0A\x17UpdateInsightTypeConfig\x12;.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest\x1A..google.cloud.recommender.v1.InsightTypeConfig\"\xDF\x02\xDAA\x1Finsight_type_config,update_mask\x82\xD3\xE4\x93\x02\xB6\x022K/v1/{insight_type_config.name=projects/*/locations/*/insightTypes/*/config}:\x13insight_type_configZg2P/v1/{insight_type_config.name=organizations/*/locations/*/insightTypes/*/config}:\x13insight_type_configZi2R/v1/{insight_type_config.name=billingAccounts/*/locations/*/insightTypes/*/config}:\x13insight_type_config\x1AN\xCAA\x1Arecommender.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x9D\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x10RecommenderProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php new file mode 100644 index 000000000000..103db5b03cf6 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php @@ -0,0 +1,181 @@ +google.cloud.recommender.v1.CostProjection + */ +class CostProjection extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field .google.type.Money cost = 1; + */ + protected $cost = null; + /** + * Duration for which this cost applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $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; + */ + protected $cost_in_local_currency = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Money $cost + * 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. + * @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) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field .google.type.Money cost = 1; + * @return \Google\Type\Money|null + */ + public function getCost() + { + return $this->cost; + } + + public function hasCost() + { + return isset($this->cost); + } + + public function clearCost() + { + unset($this->cost); + } + + /** + * 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. + * + * Generated from protobuf field .google.type.Money cost = 1; + * @param \Google\Type\Money $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->cost = $var; + + return $this; + } + + /** + * Duration for which this cost applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration for which this cost applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $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/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php new file mode 100644 index 000000000000..ace4530310c9 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php @@ -0,0 +1,81 @@ +google.cloud.recommender.v1.GetInsightRequest + */ +class GetInsightRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the insight. Please see + * {@see RecommenderClient::insightName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\GetInsightRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the insight. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php new file mode 100644 index 000000000000..032e28d2b6d9 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php @@ -0,0 +1,111 @@ +google.cloud.recommender.v1.GetInsightTypeConfigRequest + */ +class GetInsightTypeConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the InsightTypeConfig to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the InsightTypeConfig to get. + * + * Acceptable formats: + * + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * Please see {@see RecommenderClient::insightTypeConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\GetInsightTypeConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the InsightTypeConfig to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the InsightTypeConfig to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the InsightTypeConfig to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php new file mode 100644 index 000000000000..99c72f314353 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php @@ -0,0 +1,81 @@ +google.cloud.recommender.v1.GetRecommendationRequest + */ +class GetRecommendationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the recommendation. Please see + * {@see RecommenderClient::recommendationName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\GetRecommendationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the recommendation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php new file mode 100644 index 000000000000..5272b06c2283 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php @@ -0,0 +1,111 @@ +google.cloud.recommender.v1.GetRecommenderConfigRequest + */ +class GetRecommenderConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Recommendation Config to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the Recommendation Config to get. + * + * Acceptable formats: + * + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * Please see {@see RecommenderClient::recommenderConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\GetRecommenderConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the Recommendation Config to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Recommendation Config to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Recommendation Config to get. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php new file mode 100644 index 000000000000..064a98d2a047 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php @@ -0,0 +1,242 @@ +google.cloud.recommender.v1.Impact + */ +class Impact extends \Google\Protobuf\Internal\Message +{ + /** + * Category that is being targeted. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; + */ + protected $category = 0; + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + */ + protected $service = ''; + protected $projection; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $category + * Category that is being targeted. + * @type \Google\Cloud\Recommender\V1\CostProjection $cost_projection + * Use with CategoryType.COST + * @type \Google\Cloud\Recommender\V1\SecurityProjection $security_projection + * Use with CategoryType.SECURITY + * @type \Google\Cloud\Recommender\V1\SustainabilityProjection $sustainability_projection + * Use with CategoryType.SUSTAINABILITY + * @type \Google\Cloud\Recommender\V1\ReliabilityProjection $reliability_projection + * Use with CategoryType.RELIABILITY + * @type string $service + * The service that this impact is associated with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Category that is being targeted. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * Category that is being targeted. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Impact\Category::class); + $this->category = $var; + + return $this; + } + + /** + * Use with CategoryType.COST + * + * Generated from protobuf field .google.cloud.recommender.v1.CostProjection cost_projection = 100; + * @return \Google\Cloud\Recommender\V1\CostProjection|null + */ + public function getCostProjection() + { + return $this->readOneof(100); + } + + public function hasCostProjection() + { + return $this->hasOneof(100); + } + + /** + * Use with CategoryType.COST + * + * Generated from protobuf field .google.cloud.recommender.v1.CostProjection cost_projection = 100; + * @param \Google\Cloud\Recommender\V1\CostProjection $var + * @return $this + */ + public function setCostProjection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\CostProjection::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Use with CategoryType.SECURITY + * + * Generated from protobuf field .google.cloud.recommender.v1.SecurityProjection security_projection = 101; + * @return \Google\Cloud\Recommender\V1\SecurityProjection|null + */ + public function getSecurityProjection() + { + return $this->readOneof(101); + } + + public function hasSecurityProjection() + { + return $this->hasOneof(101); + } + + /** + * Use with CategoryType.SECURITY + * + * Generated from protobuf field .google.cloud.recommender.v1.SecurityProjection security_projection = 101; + * @param \Google\Cloud\Recommender\V1\SecurityProjection $var + * @return $this + */ + public function setSecurityProjection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\SecurityProjection::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Use with CategoryType.SUSTAINABILITY + * + * Generated from protobuf field .google.cloud.recommender.v1.SustainabilityProjection sustainability_projection = 102; + * @return \Google\Cloud\Recommender\V1\SustainabilityProjection|null + */ + public function getSustainabilityProjection() + { + return $this->readOneof(102); + } + + public function hasSustainabilityProjection() + { + return $this->hasOneof(102); + } + + /** + * Use with CategoryType.SUSTAINABILITY + * + * Generated from protobuf field .google.cloud.recommender.v1.SustainabilityProjection sustainability_projection = 102; + * @param \Google\Cloud\Recommender\V1\SustainabilityProjection $var + * @return $this + */ + public function setSustainabilityProjection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\SustainabilityProjection::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Use with CategoryType.RELIABILITY + * + * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; + * @return \Google\Cloud\Recommender\V1\ReliabilityProjection|null + */ + public function getReliabilityProjection() + { + return $this->readOneof(103); + } + + public function hasReliabilityProjection() + { + return $this->hasOneof(103); + } + + /** + * Use with CategoryType.RELIABILITY + * + * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; + * @param \Google\Cloud\Recommender\V1\ReliabilityProjection $var + * @return $this + */ + public function setReliabilityProjection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\ReliabilityProjection::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * @return string + */ + public function getProjection() + { + return $this->whichOneof("projection"); + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php new file mode 100644 index 000000000000..64072358d665 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php @@ -0,0 +1,89 @@ +google.cloud.recommender.v1.Impact.Category + */ +class Category +{ + /** + * Default unspecified category. Don't use directly. + * + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * Indicates a potential increase or decrease in cost. + * + * Generated from protobuf enum COST = 1; + */ + const COST = 1; + /** + * Indicates a potential increase or decrease in security. + * + * Generated from protobuf enum SECURITY = 2; + */ + const SECURITY = 2; + /** + * Indicates a potential increase or decrease in performance. + * + * Generated from protobuf enum PERFORMANCE = 3; + */ + const PERFORMANCE = 3; + /** + * Indicates a potential increase or decrease in manageability. + * + * Generated from protobuf enum MANAGEABILITY = 4; + */ + const MANAGEABILITY = 4; + /** + * Indicates a potential increase or decrease in sustainability. + * + * Generated from protobuf enum SUSTAINABILITY = 5; + */ + const SUSTAINABILITY = 5; + /** + * Indicates a potential increase or decrease in reliability. + * + * Generated from protobuf enum RELIABILITY = 6; + */ + const RELIABILITY = 6; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::COST => 'COST', + self::SECURITY => 'SECURITY', + self::PERFORMANCE => 'PERFORMANCE', + self::MANAGEABILITY => 'MANAGEABILITY', + self::SUSTAINABILITY => 'SUSTAINABILITY', + self::RELIABILITY => 'RELIABILITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php new file mode 100644 index 000000000000..106f5c30272d --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php @@ -0,0 +1,502 @@ +google.cloud.recommender.v1.Insight + */ +class Insight extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Fully qualified resource names that this insight is targeting. + * + * Generated from protobuf field repeated string target_resources = 9; + */ + private $target_resources; + /** + * Insight subtype. Insight content schema will be stable for a given subtype. + * + * Generated from protobuf field string insight_subtype = 10; + */ + protected $insight_subtype = ''; + /** + * A struct of custom fields to explain the insight. + * Example: "grantedPermissionsCount": "1000" + * + * Generated from protobuf field .google.protobuf.Struct content = 3; + */ + protected $content = null; + /** + * Timestamp of the latest data used to generate the insight. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + */ + protected $last_refresh_time = null; + /** + * 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). + * + * Generated from protobuf field .google.protobuf.Duration observation_period = 5; + */ + protected $observation_period = null; + /** + * Information state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; + */ + protected $state_info = null; + /** + * Category being targeted by the insight. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; + */ + protected $category = 0; + /** + * Insight's severity. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; + */ + protected $severity = 0; + /** + * Fingerprint of the Insight. Provides optimistic locking when updating + * states. + * + * Generated from protobuf field string etag = 11; + */ + protected $etag = ''; + /** + * Recommendations derived from this insight. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; + */ + private $associated_recommendations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the insight. + * @type string $description + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * @type string[] $target_resources + * Fully qualified resource names that this insight is targeting. + * @type string $insight_subtype + * Insight subtype. Insight content schema will be stable for a given subtype. + * @type \Google\Protobuf\Struct $content + * A struct of custom fields to explain the insight. + * Example: "grantedPermissionsCount": "1000" + * @type \Google\Protobuf\Timestamp $last_refresh_time + * Timestamp of the latest data used to generate the insight. + * @type \Google\Protobuf\Duration $observation_period + * 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). + * @type \Google\Cloud\Recommender\V1\InsightStateInfo $state_info + * Information state and metadata. + * @type int $category + * Category being targeted by the insight. + * @type int $severity + * Insight's severity. + * @type string $etag + * Fingerprint of the Insight. Provides optimistic locking when updating + * states. + * @type \Google\Cloud\Recommender\V1\Insight\RecommendationReference[] $associated_recommendations + * Recommendations derived from this insight. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Fully qualified resource names that this insight is targeting. + * + * Generated from protobuf field repeated string target_resources = 9; + * @return RepeatedField + */ + public function getTargetResources() + { + return $this->target_resources; + } + + /** + * Fully qualified resource names that this insight is targeting. + * + * Generated from protobuf field repeated string target_resources = 9; + * @param string[] $var + * @return $this + */ + public function setTargetResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_resources = $arr; + + return $this; + } + + /** + * Insight subtype. Insight content schema will be stable for a given subtype. + * + * Generated from protobuf field string insight_subtype = 10; + * @return string + */ + public function getInsightSubtype() + { + return $this->insight_subtype; + } + + /** + * Insight subtype. Insight content schema will be stable for a given subtype. + * + * Generated from protobuf field string insight_subtype = 10; + * @param string $var + * @return $this + */ + public function setInsightSubtype($var) + { + GPBUtil::checkString($var, True); + $this->insight_subtype = $var; + + return $this; + } + + /** + * A struct of custom fields to explain the insight. + * Example: "grantedPermissionsCount": "1000" + * + * Generated from protobuf field .google.protobuf.Struct content = 3; + * @return \Google\Protobuf\Struct|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * A struct of custom fields to explain the insight. + * Example: "grantedPermissionsCount": "1000" + * + * Generated from protobuf field .google.protobuf.Struct content = 3; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->content = $var; + + return $this; + } + + /** + * Timestamp of the latest data used to generate the insight. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastRefreshTime() + { + return $this->last_refresh_time; + } + + public function hasLastRefreshTime() + { + return isset($this->last_refresh_time); + } + + public function clearLastRefreshTime() + { + unset($this->last_refresh_time); + } + + /** + * Timestamp of the latest data used to generate the insight. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastRefreshTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_refresh_time = $var; + + return $this; + } + + /** + * 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). + * + * Generated from protobuf field .google.protobuf.Duration observation_period = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getObservationPeriod() + { + return $this->observation_period; + } + + public function hasObservationPeriod() + { + return isset($this->observation_period); + } + + public function clearObservationPeriod() + { + unset($this->observation_period); + } + + /** + * 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). + * + * Generated from protobuf field .google.protobuf.Duration observation_period = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setObservationPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->observation_period = $var; + + return $this; + } + + /** + * Information state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; + * @return \Google\Cloud\Recommender\V1\InsightStateInfo|null + */ + public function getStateInfo() + { + return $this->state_info; + } + + public function hasStateInfo() + { + return isset($this->state_info); + } + + public function clearStateInfo() + { + unset($this->state_info); + } + + /** + * Information state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; + * @param \Google\Cloud\Recommender\V1\InsightStateInfo $var + * @return $this + */ + public function setStateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightStateInfo::class); + $this->state_info = $var; + + return $this; + } + + /** + * Category being targeted by the insight. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; + * @return int + */ + public function getCategory() + { + return $this->category; + } + + /** + * Category being targeted by the insight. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; + * @param int $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Insight\Category::class); + $this->category = $var; + + return $this; + } + + /** + * Insight's severity. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Insight's severity. + * + * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Insight\Severity::class); + $this->severity = $var; + + return $this; + } + + /** + * Fingerprint of the Insight. Provides optimistic locking when updating + * states. + * + * Generated from protobuf field string etag = 11; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Fingerprint of the Insight. Provides optimistic locking when updating + * states. + * + * Generated from protobuf field string etag = 11; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Recommendations derived from this insight. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Insight\RecommendationReference> + */ + public function getAssociatedRecommendations() + { + return $this->associated_recommendations; + } + + /** + * Recommendations derived from this insight. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; + * @param \Google\Cloud\Recommender\V1\Insight\RecommendationReference[] $var + * @return $this + */ + public function setAssociatedRecommendations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Insight\RecommendationReference::class); + $this->associated_recommendations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php new file mode 100644 index 000000000000..7943fc37cf74 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php @@ -0,0 +1,89 @@ +google.cloud.recommender.v1.Insight.Category + */ +class Category +{ + /** + * Unspecified category. + * + * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; + */ + const CATEGORY_UNSPECIFIED = 0; + /** + * The insight is related to cost. + * + * Generated from protobuf enum COST = 1; + */ + const COST = 1; + /** + * The insight is related to security. + * + * Generated from protobuf enum SECURITY = 2; + */ + const SECURITY = 2; + /** + * The insight is related to performance. + * + * Generated from protobuf enum PERFORMANCE = 3; + */ + const PERFORMANCE = 3; + /** + * This insight is related to manageability. + * + * Generated from protobuf enum MANAGEABILITY = 4; + */ + const MANAGEABILITY = 4; + /** + * The insight is related to sustainability. + * + * Generated from protobuf enum SUSTAINABILITY = 5; + */ + const SUSTAINABILITY = 5; + /** + * This insight is related to reliability. + * + * Generated from protobuf enum RELIABILITY = 6; + */ + const RELIABILITY = 6; + + private static $valueToName = [ + self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', + self::COST => 'COST', + self::SECURITY => 'SECURITY', + self::PERFORMANCE => 'PERFORMANCE', + self::MANAGEABILITY => 'MANAGEABILITY', + self::SUSTAINABILITY => 'SUSTAINABILITY', + self::RELIABILITY => 'RELIABILITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php new file mode 100644 index 000000000000..a5257a75d77e --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php @@ -0,0 +1,71 @@ +google.cloud.recommender.v1.Insight.RecommendationReference + */ +class RecommendationReference extends \Google\Protobuf\Internal\Message +{ + /** + * Recommendation resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + * + * Generated from protobuf field string recommendation = 1; + */ + protected $recommendation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $recommendation + * Recommendation resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); + parent::__construct($data); + } + + /** + * Recommendation resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + * + * Generated from protobuf field string recommendation = 1; + * @return string + */ + public function getRecommendation() + { + return $this->recommendation; + } + + /** + * Recommendation resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] + * + * Generated from protobuf field string recommendation = 1; + * @param string $var + * @return $this + */ + public function setRecommendation($var) + { + GPBUtil::checkString($var, True); + $this->recommendation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php new file mode 100644 index 000000000000..1190d15108a4 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php @@ -0,0 +1,75 @@ +google.cloud.recommender.v1.Insight.Severity + */ +class Severity +{ + /** + * Insight has unspecified severity. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Insight has low severity. + * + * Generated from protobuf enum LOW = 1; + */ + const LOW = 1; + /** + * Insight has medium severity. + * + * Generated from protobuf enum MEDIUM = 2; + */ + const MEDIUM = 2; + /** + * Insight has high severity. + * + * Generated from protobuf enum HIGH = 3; + */ + const HIGH = 3; + /** + * Insight has critical severity. + * + * Generated from protobuf enum CRITICAL = 4; + */ + const CRITICAL = 4; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::CRITICAL => 'CRITICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php new file mode 100644 index 000000000000..46cff011fb94 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php @@ -0,0 +1,101 @@ +google.cloud.recommender.v1.InsightStateInfo + */ +class InsightStateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Insight state. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; + */ + protected $state = 0; + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + */ + private $state_metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Insight state. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * A map of metadata for the state, provided by user or automations systems. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); + parent::__construct($data); + } + + /** + * Insight state. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Insight state. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\InsightStateInfo\State::class); + $this->state = $var; + + return $this; + } + + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php new file mode 100644 index 000000000000..191ef39ddbea --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php @@ -0,0 +1,74 @@ +google.cloud.recommender.v1.InsightStateInfo.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Insight is active. Content for ACTIVE insights can be updated by Google. + * ACTIVE insights can be marked DISMISSED OR ACCEPTED. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Some action has been taken based on this insight. Insights become + * accepted when a recommendation derived from the insight has been marked + * CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked + * ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED + * insights can only be marked ACCEPTED (which may update state metadata). + * + * Generated from protobuf enum ACCEPTED = 2; + */ + const ACCEPTED = 2; + /** + * Insight is dismissed. Content for DISMISSED insights can be updated by + * Google. DISMISSED insights can be marked as ACTIVE. + * + * Generated from protobuf enum DISMISSED = 3; + */ + const DISMISSED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::ACCEPTED => 'ACCEPTED', + self::DISMISSED => 'DISMISSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php new file mode 100644 index 000000000000..8b5e9258437d --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php @@ -0,0 +1,347 @@ +google.cloud.recommender.v1.InsightTypeConfig + */ +class InsightTypeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of insight type config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * InsightTypeGenerationConfig which configures the generation of + * insights for this insight type. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; + */ + protected $insight_type_generation_config = null; + /** + * Fingerprint of the InsightTypeConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + */ + private $annotations; + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of insight type config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config + * @type \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig $insight_type_generation_config + * InsightTypeGenerationConfig which configures the generation of + * insights for this insight type. + * @type string $etag + * Fingerprint of the InsightTypeConfig. Provides optimistic locking when + * updating. + * @type \Google\Protobuf\Timestamp $update_time + * Last time when the config was updated. + * @type string $revision_id + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type string $display_name + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\InsightTypeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of insight type config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of insight type config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * InsightTypeGenerationConfig which configures the generation of + * insights for this insight type. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; + * @return \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig|null + */ + public function getInsightTypeGenerationConfig() + { + return $this->insight_type_generation_config; + } + + public function hasInsightTypeGenerationConfig() + { + return isset($this->insight_type_generation_config); + } + + public function clearInsightTypeGenerationConfig() + { + unset($this->insight_type_generation_config); + } + + /** + * InsightTypeGenerationConfig which configures the generation of + * insights for this insight type. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; + * @param \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig $var + * @return $this + */ + public function setInsightTypeGenerationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig::class); + $this->insight_type_generation_config = $var; + + return $this; + } + + /** + * Fingerprint of the InsightTypeConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Fingerprint of the InsightTypeConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php new file mode 100644 index 000000000000..f10163c52b4b --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php @@ -0,0 +1,83 @@ +google.cloud.recommender.v1.InsightTypeGenerationConfig + */ +class InsightTypeGenerationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters for this InsightTypeGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + */ + protected $params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $params + * Parameters for this InsightTypeGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\InsightTypeConfig::initOnce(); + parent::__construct($data); + } + + /** + * Parameters for this InsightTypeGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getParams() + { + return $this->params; + } + + public function hasParams() + { + return isset($this->params); + } + + public function clearParams() + { + unset($this->params); + } + + /** + * Parameters for this InsightTypeGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php new file mode 100644 index 000000000000..07e9945da238 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php @@ -0,0 +1,319 @@ +google.cloud.recommender.v1.ListInsightsRequest + */ +class ListInsightsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * INSIGHT_TYPE_ID refers to supported insight types: + * https://cloud.google.com/recommender/docs/insights/insight-types. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression to restrict the insights returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The container resource on which to execute the request. + * Acceptable formats: + * + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * + * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * INSIGHT_TYPE_ID refers to supported insight types: + * https://cloud.google.com/recommender/docs/insights/insight-types. Please see + * {@see RecommenderClient::insightTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\ListInsightsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * INSIGHT_TYPE_ID refers to supported insight types: + * https://cloud.google.com/recommender/docs/insights/insight-types. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * @type string $page_token + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * @type string $filter + * Optional. Filter expression to restrict the insights returned. Supported + * filter fields: + * * `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) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * INSIGHT_TYPE_ID refers to supported insight types: + * https://cloud.google.com/recommender/docs/insights/insight-types. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * INSIGHT_TYPE_ID refers to supported insight types: + * https://cloud.google.com/recommender/docs/insights/insight-types. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter expression to restrict the insights returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression to restrict the insights returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php new file mode 100644 index 000000000000..565cbc3c1e45 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php @@ -0,0 +1,105 @@ +google.cloud.recommender.v1.ListInsightsResponse + */ +class ListInsightsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The set of insights for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; + */ + private $insights; + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\Insight[] $insights + * The set of insights for the `parent` resource. + * @type string $next_page_token + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * The set of insights for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Insight> + */ + public function getInsights() + { + return $this->insights; + } + + /** + * The set of insights for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; + * @param \Google\Cloud\Recommender\V1\Insight[] $var + * @return $this + */ + public function setInsights($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Insight::class); + $this->insights = $arr; + + return $this; + } + + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php new file mode 100644 index 000000000000..ae00bf92eaba --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php @@ -0,0 +1,378 @@ +google.cloud.recommender.v1.ListRecommendationsRequest + */ +class ListRecommendationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Filter expression to restrict the recommendations returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The container resource on which to execute the request. + * Acceptable formats: + * + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. Please see + * {@see RecommenderClient::recommenderName()} for help formatting this field. + * + * @return \Google\Cloud\Recommender\V1\ListRecommendationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * @param string $parent Required. The container resource on which to execute the request. + * Acceptable formats: + * + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. Please see + * {@see RecommenderClient::recommenderName()} for help formatting this field. + * @param string $filter Filter expression to restrict the recommendations returned. Supported + * filter fields: + * + * * `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) + * + * @return \Google\Cloud\Recommender\V1\ListRecommendationsRequest + * + * @experimental + */ + public static function buildFromParentFilter(string $parent, string $filter): self + { + return (new self()) + ->setParent($parent) + ->setFilter($filter); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * @type string $page_token + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * @type string $filter + * Filter expression to restrict the recommendations returned. Supported + * filter fields: + * * `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) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The container resource on which to execute the request. + * Acceptable formats: + * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` + * LOCATION here refers to GCP Locations: + * https://cloud.google.com/about/locations/ + * RECOMMENDER_ID refers to supported recommenders: + * https://cloud.google.com/recommender/docs/recommenders. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. If not specified, the server will + * determine the number of results to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, retrieves the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters must be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter expression to restrict the recommendations returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter expression to restrict the recommendations returned. Supported + * filter fields: + * * `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) + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php new file mode 100644 index 000000000000..91ecba4ce0fe --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php @@ -0,0 +1,105 @@ +google.cloud.recommender.v1.ListRecommendationsResponse + */ +class ListRecommendationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The set of recommendations for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; + */ + private $recommendations; + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\Recommendation[] $recommendations + * The set of recommendations for the `parent` resource. + * @type string $next_page_token + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * The set of recommendations for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Recommendation> + */ + public function getRecommendations() + { + return $this->recommendations; + } + + /** + * The set of recommendations for the `parent` resource. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; + * @param \Google\Cloud\Recommender\V1\Recommendation[] $var + * @return $this + */ + public function setRecommendations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Recommendation::class); + $this->recommendations = $arr; + + return $this; + } + + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be used to request the next page of results. This field is + * empty if there are no additional results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php new file mode 100644 index 000000000000..65d8c4d21839 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php @@ -0,0 +1,158 @@ +google.cloud.recommender.v1.MarkInsightAcceptedRequest + */ +class MarkInsightAcceptedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. State properties user wish to include with this state. Full + * replace of the current state_metadata. + * + * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $state_metadata; + /** + * Required. Fingerprint of the Insight. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the insight. Please see + * {@see RecommenderClient::insightName()} for help formatting this field. + * @param array $stateMetadata Optional. State properties user wish to include with this state. Full + * replace of the current state_metadata. + * @param string $etag Required. Fingerprint of the Insight. Provides optimistic locking. + * + * @return \Google\Cloud\Recommender\V1\MarkInsightAcceptedRequest + * + * @experimental + */ + public static function build(string $name, array $stateMetadata, string $etag): self + { + return (new self()) + ->setName($name) + ->setStateMetadata($stateMetadata) + ->setEtag($etag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the insight. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * Optional. State properties user wish to include with this state. Full + * replace of the current state_metadata. + * @type string $etag + * Required. Fingerprint of the Insight. Provides optimistic locking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the insight. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. State properties user wish to include with this state. Full + * replace of the current state_metadata. + * + * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * Optional. State properties user wish to include with this state. Full + * replace of the current state_metadata. + * + * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + + /** + * Required. Fingerprint of the Insight. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. Fingerprint of the Insight. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php new file mode 100644 index 000000000000..5e9fcd7cb0b2 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php @@ -0,0 +1,168 @@ +google.cloud.recommender.v1.MarkRecommendationClaimedRequest + */ +class MarkRecommendationClaimedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + */ + private $state_metadata; + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the recommendation. Please see + * {@see RecommenderClient::recommendationName()} for help formatting this field. + * @param array $stateMetadata State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * @return \Google\Cloud\Recommender\V1\MarkRecommendationClaimedRequest + * + * @experimental + */ + public static function build(string $name, array $stateMetadata, string $etag): self + { + return (new self()) + ->setName($name) + ->setStateMetadata($stateMetadata) + ->setEtag($etag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the recommendation. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @type string $etag + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php new file mode 100644 index 000000000000..d03304a46fc9 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php @@ -0,0 +1,101 @@ +google.cloud.recommender.v1.MarkRecommendationDismissedRequest + */ +class MarkRecommendationDismissedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 2; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the recommendation. + * @type string $etag + * Fingerprint of the Recommendation. Provides optimistic locking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 2; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 2; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php new file mode 100644 index 000000000000..f829ea280575 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php @@ -0,0 +1,168 @@ +google.cloud.recommender.v1.MarkRecommendationFailedRequest + */ +class MarkRecommendationFailedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + */ + private $state_metadata; + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the recommendation. Please see + * {@see RecommenderClient::recommendationName()} for help formatting this field. + * @param array $stateMetadata State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * @return \Google\Cloud\Recommender\V1\MarkRecommendationFailedRequest + * + * @experimental + */ + public static function build(string $name, array $stateMetadata, string $etag): self + { + return (new self()) + ->setName($name) + ->setStateMetadata($stateMetadata) + ->setEtag($etag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the recommendation. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @type string $etag + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php new file mode 100644 index 000000000000..992334b5dee6 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php @@ -0,0 +1,168 @@ +google.cloud.recommender.v1.MarkRecommendationSucceededRequest + */ +class MarkRecommendationSucceededRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + */ + private $state_metadata; + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the recommendation. Please see + * {@see RecommenderClient::recommendationName()} for help formatting this field. + * @param array $stateMetadata State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * @return \Google\Cloud\Recommender\V1\MarkRecommendationSucceededRequest + * + * @experimental + */ + public static function build(string $name, array $stateMetadata, string $etag): self + { + return (new self()) + ->setName($name) + ->setStateMetadata($stateMetadata) + ->setEtag($etag); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the recommendation. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * @type string $etag + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * State properties to include with this state. Overwrites any existing + * `state_metadata`. + * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. + * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. + * + * Generated from protobuf field map state_metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Required. Fingerprint of the Recommendation. Provides optimistic locking. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php new file mode 100644 index 000000000000..5514a8df0ff3 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php @@ -0,0 +1,564 @@ +google.cloud.recommender.v1.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + /** + * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', + * 'copy', 'test' and custom operations. This field is case-insensitive and + * always populated. + * + * Generated from protobuf field string action = 1; + */ + protected $action = ''; + /** + * Type of GCP resource being modified/tested. This field is always populated. + * Example: cloudresourcemanager.googleapis.com/Project, + * compute.googleapis.com/Instance + * + * Generated from protobuf field string resource_type = 2; + */ + protected $resource_type = ''; + /** + * Contains the fully qualified resource name. This field is always populated. + * ex: //cloudresourcemanager.googleapis.com/projects/foo. + * + * Generated from protobuf field string resource = 3; + */ + protected $resource = ''; + /** + * 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. + * + * Generated from protobuf field string path = 4; + */ + protected $path = ''; + /** + * 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 = and resource_name = . + * This field is empty for all other values of `action`. + * + * Generated from protobuf field string source_resource = 5; + */ + protected $source_resource = ''; + /** + * 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. + * + * Generated from protobuf field string source_path = 6; + */ + protected $source_path = ''; + /** + * 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. + * + * Generated from protobuf field map path_filters = 8; + */ + private $path_filters; + /** + * 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. + * + * Generated from protobuf field map path_value_matchers = 11; + */ + private $path_value_matchers; + protected $path_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action + * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', + * 'copy', 'test' and custom operations. This field is case-insensitive and + * always populated. + * @type string $resource_type + * Type of GCP resource being modified/tested. This field is always populated. + * Example: cloudresourcemanager.googleapis.com/Project, + * compute.googleapis.com/Instance + * @type string $resource + * Contains the fully qualified resource name. This field is always populated. + * ex: //cloudresourcemanager.googleapis.com/projects/foo. + * @type string $path + * 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. + * @type string $source_resource + * 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 = and resource_name = . + * This field is empty for all other values of `action`. + * @type string $source_path + * 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. + * @type \Google\Protobuf\Value $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. + * @type \Google\Cloud\Recommender\V1\ValueMatcher $value_matcher + * 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. + * @type array|\Google\Protobuf\Internal\MapField $path_filters + * 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. + * @type array|\Google\Protobuf\Internal\MapField $path_value_matchers + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', + * 'copy', 'test' and custom operations. This field is case-insensitive and + * always populated. + * + * Generated from protobuf field string action = 1; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', + * 'copy', 'test' and custom operations. This field is case-insensitive and + * always populated. + * + * Generated from protobuf field string action = 1; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * Type of GCP resource being modified/tested. This field is always populated. + * Example: cloudresourcemanager.googleapis.com/Project, + * compute.googleapis.com/Instance + * + * Generated from protobuf field string resource_type = 2; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Type of GCP resource being modified/tested. This field is always populated. + * Example: cloudresourcemanager.googleapis.com/Project, + * compute.googleapis.com/Instance + * + * Generated from protobuf field string resource_type = 2; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + + /** + * Contains the fully qualified resource name. This field is always populated. + * ex: //cloudresourcemanager.googleapis.com/projects/foo. + * + * Generated from protobuf field string resource = 3; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Contains the fully qualified resource name. This field is always populated. + * ex: //cloudresourcemanager.googleapis.com/projects/foo. + * + * Generated from protobuf field string resource = 3; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string path = 4; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * 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. + * + * Generated from protobuf field string path = 4; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * 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 = and resource_name = . + * This field is empty for all other values of `action`. + * + * Generated from protobuf field string source_resource = 5; + * @return string + */ + public function getSourceResource() + { + return $this->source_resource; + } + + /** + * 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 = and resource_name = . + * This field is empty for all other values of `action`. + * + * Generated from protobuf field string source_resource = 5; + * @param string $var + * @return $this + */ + public function setSourceResource($var) + { + GPBUtil::checkString($var, True); + $this->source_resource = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string source_path = 6; + * @return string + */ + public function getSourcePath() + { + return $this->source_path; + } + + /** + * 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. + * + * Generated from protobuf field string source_path = 6; + * @param string $var + * @return $this + */ + public function setSourcePath($var) + { + GPBUtil::checkString($var, True); + $this->source_path = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.Value value = 7; + * @return \Google\Protobuf\Value|null + */ + public function getValue() + { + return $this->readOneof(7); + } + + public function hasValue() + { + return $this->hasOneof(7); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.Value value = 7; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.cloud.recommender.v1.ValueMatcher value_matcher = 10; + * @return \Google\Cloud\Recommender\V1\ValueMatcher|null + */ + public function getValueMatcher() + { + return $this->readOneof(10); + } + + public function hasValueMatcher() + { + return $this->hasOneof(10); + } + + /** + * 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. + * + * Generated from protobuf field .google.cloud.recommender.v1.ValueMatcher value_matcher = 10; + * @param \Google\Cloud\Recommender\V1\ValueMatcher $var + * @return $this + */ + public function setValueMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\ValueMatcher::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field map path_filters = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPathFilters() + { + return $this->path_filters; + } + + /** + * 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. + * + * Generated from protobuf field map path_filters = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPathFilters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->path_filters = $arr; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field map path_value_matchers = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPathValueMatchers() + { + return $this->path_value_matchers; + } + + /** + * 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. + * + * Generated from protobuf field map path_value_matchers = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPathValueMatchers($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\ValueMatcher::class); + $this->path_value_matchers = $arr; + + return $this; + } + + /** + * @return string + */ + public function getPathValue() + { + return $this->whichOneof("path_value"); + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php new file mode 100644 index 000000000000..9aa61b2da10c --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php @@ -0,0 +1,71 @@ +google.cloud.recommender.v1.OperationGroup + */ +class OperationGroup extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; + */ + private $operations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\Operation[] $operations + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Operation> + */ + public function getOperations() + { + return $this->operations; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; + * @param \Google\Cloud\Recommender\V1\Operation[] $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Operation::class); + $this->operations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php new file mode 100644 index 000000000000..dffee7b09da0 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php @@ -0,0 +1,580 @@ +google.cloud.recommender.v1.Recommendation + */ +class Recommendation extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * 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" + * + * Generated from protobuf field string recommender_subtype = 12; + */ + protected $recommender_subtype = ''; + /** + * Last time this recommendation was refreshed by the system that created it + * in the first place. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + */ + protected $last_refresh_time = null; + /** + * The primary impact that this recommendation can have while trying to + * optimize for one category. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; + */ + protected $primary_impact = null; + /** + * Optional set of additional impact that this recommendation may have when + * trying to optimize for the primary category. These may be positive + * or negative. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; + */ + private $additional_impact; + /** + * Recommendation's priority. + * + * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; + */ + protected $priority = 0; + /** + * Content of the recommendation describing recommended changes to resources. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; + */ + protected $content = null; + /** + * Information for state. Contains state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; + */ + protected $state_info = null; + /** + * Fingerprint of the Recommendation. Provides optimistic locking when + * updating states. + * + * Generated from protobuf field string etag = 11; + */ + protected $etag = ''; + /** + * Insights that led to this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; + */ + private $associated_insights; + /** + * 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. + * + * Generated from protobuf field string xor_group_id = 18; + */ + protected $xor_group_id = ''; + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + */ + private $target_resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of recommendation. + * @type string $description + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * @type string $recommender_subtype + * 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" + * @type \Google\Protobuf\Timestamp $last_refresh_time + * Last time this recommendation was refreshed by the system that created it + * in the first place. + * @type \Google\Cloud\Recommender\V1\Impact $primary_impact + * The primary impact that this recommendation can have while trying to + * optimize for one category. + * @type \Google\Cloud\Recommender\V1\Impact[] $additional_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. + * @type int $priority + * Recommendation's priority. + * @type \Google\Cloud\Recommender\V1\RecommendationContent $content + * Content of the recommendation describing recommended changes to resources. + * @type \Google\Cloud\Recommender\V1\RecommendationStateInfo $state_info + * Information for state. Contains state and metadata. + * @type string $etag + * Fingerprint of the Recommendation. Provides optimistic locking when + * updating states. + * @type \Google\Cloud\Recommender\V1\Recommendation\InsightReference[] $associated_insights + * Insights that led to this recommendation. + * @type string $xor_group_id + * 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. + * @type string[] $target_resources + * Fully qualified resource names that this recommendation is targeting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of recommendation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-form human readable summary in English. The maximum length is 500 + * characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * 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" + * + * Generated from protobuf field string recommender_subtype = 12; + * @return string + */ + public function getRecommenderSubtype() + { + return $this->recommender_subtype; + } + + /** + * 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" + * + * Generated from protobuf field string recommender_subtype = 12; + * @param string $var + * @return $this + */ + public function setRecommenderSubtype($var) + { + GPBUtil::checkString($var, True); + $this->recommender_subtype = $var; + + return $this; + } + + /** + * Last time this recommendation was refreshed by the system that created it + * in the first place. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastRefreshTime() + { + return $this->last_refresh_time; + } + + public function hasLastRefreshTime() + { + return isset($this->last_refresh_time); + } + + public function clearLastRefreshTime() + { + unset($this->last_refresh_time); + } + + /** + * Last time this recommendation was refreshed by the system that created it + * in the first place. + * + * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastRefreshTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_refresh_time = $var; + + return $this; + } + + /** + * The primary impact that this recommendation can have while trying to + * optimize for one category. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; + * @return \Google\Cloud\Recommender\V1\Impact|null + */ + public function getPrimaryImpact() + { + return $this->primary_impact; + } + + public function hasPrimaryImpact() + { + return isset($this->primary_impact); + } + + public function clearPrimaryImpact() + { + unset($this->primary_impact); + } + + /** + * The primary impact that this recommendation can have while trying to + * optimize for one category. + * + * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; + * @param \Google\Cloud\Recommender\V1\Impact $var + * @return $this + */ + public function setPrimaryImpact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\Impact::class); + $this->primary_impact = $var; + + return $this; + } + + /** + * Optional set of additional impact that this recommendation may have when + * trying to optimize for the primary category. These may be positive + * or negative. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Impact> + */ + public function getAdditionalImpact() + { + return $this->additional_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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; + * @param \Google\Cloud\Recommender\V1\Impact[] $var + * @return $this + */ + public function setAdditionalImpact($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Impact::class); + $this->additional_impact = $arr; + + return $this; + } + + /** + * Recommendation's priority. + * + * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Recommendation's priority. + * + * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Recommendation\Priority::class); + $this->priority = $var; + + return $this; + } + + /** + * Content of the recommendation describing recommended changes to resources. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; + * @return \Google\Cloud\Recommender\V1\RecommendationContent|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * Content of the recommendation describing recommended changes to resources. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; + * @param \Google\Cloud\Recommender\V1\RecommendationContent $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommendationContent::class); + $this->content = $var; + + return $this; + } + + /** + * Information for state. Contains state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; + * @return \Google\Cloud\Recommender\V1\RecommendationStateInfo|null + */ + public function getStateInfo() + { + return $this->state_info; + } + + public function hasStateInfo() + { + return isset($this->state_info); + } + + public function clearStateInfo() + { + unset($this->state_info); + } + + /** + * Information for state. Contains state and metadata. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; + * @param \Google\Cloud\Recommender\V1\RecommendationStateInfo $var + * @return $this + */ + public function setStateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommendationStateInfo::class); + $this->state_info = $var; + + return $this; + } + + /** + * Fingerprint of the Recommendation. Provides optimistic locking when + * updating states. + * + * Generated from protobuf field string etag = 11; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Fingerprint of the Recommendation. Provides optimistic locking when + * updating states. + * + * Generated from protobuf field string etag = 11; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Insights that led to this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; + * @return RepeatedField<\Google\Cloud\Recommender\V1\Recommendation\InsightReference> + */ + public function getAssociatedInsights() + { + return $this->associated_insights; + } + + /** + * Insights that led to this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; + * @param \Google\Cloud\Recommender\V1\Recommendation\InsightReference[] $var + * @return $this + */ + public function setAssociatedInsights($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Recommendation\InsightReference::class); + $this->associated_insights = $arr; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string xor_group_id = 18; + * @return string + */ + public function getXorGroupId() + { + return $this->xor_group_id; + } + + /** + * 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. + * + * Generated from protobuf field string xor_group_id = 18; + * @param string $var + * @return $this + */ + public function setXorGroupId($var) + { + GPBUtil::checkString($var, True); + $this->xor_group_id = $var; + + return $this; + } + + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + * @return RepeatedField + */ + public function getTargetResources() + { + return $this->target_resources; + } + + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + * @param string[] $var + * @return $this + */ + public function setTargetResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_resources = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php new file mode 100644 index 000000000000..1bec6c533c5f --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php @@ -0,0 +1,71 @@ +google.cloud.recommender.v1.Recommendation.InsightReference + */ +class InsightReference extends \Google\Protobuf\Internal\Message +{ + /** + * Insight resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + * + * Generated from protobuf field string insight = 1; + */ + protected $insight = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $insight + * Insight resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Insight resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + * + * Generated from protobuf field string insight = 1; + * @return string + */ + public function getInsight() + { + return $this->insight; + } + + /** + * Insight resource name, e.g. + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] + * + * Generated from protobuf field string insight = 1; + * @param string $var + * @return $this + */ + public function setInsight($var) + { + GPBUtil::checkString($var, True); + $this->insight = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php new file mode 100644 index 000000000000..dc2b823d14f1 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php @@ -0,0 +1,75 @@ +google.cloud.recommender.v1.Recommendation.Priority + */ +class Priority +{ + /** + * Recommendation has unspecified priority. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Recommendation has P4 priority (lowest priority). + * + * Generated from protobuf enum P4 = 1; + */ + const P4 = 1; + /** + * Recommendation has P3 priority (second lowest priority). + * + * Generated from protobuf enum P3 = 2; + */ + const P3 = 2; + /** + * Recommendation has P2 priority (second highest priority). + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Recommendation has P1 priority (highest priority). + * + * Generated from protobuf enum P1 = 4; + */ + const P1 = 4; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P4 => 'P4', + self::P3 => 'P3', + self::P2 => 'P2', + self::P1 => 'P1', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php new file mode 100644 index 000000000000..dec286b2e30e --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php @@ -0,0 +1,119 @@ +google.cloud.recommender.v1.RecommendationContent + */ +class RecommendationContent extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; + */ + private $operation_groups; + /** + * Condensed overview information about the recommendation. + * + * Generated from protobuf field .google.protobuf.Struct overview = 3; + */ + protected $overview = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\OperationGroup[] $operation_groups + * 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. + * @type \Google\Protobuf\Struct $overview + * Condensed overview information about the recommendation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; + * @return RepeatedField<\Google\Cloud\Recommender\V1\OperationGroup> + */ + public function getOperationGroups() + { + return $this->operation_groups; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; + * @param \Google\Cloud\Recommender\V1\OperationGroup[] $var + * @return $this + */ + public function setOperationGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\OperationGroup::class); + $this->operation_groups = $arr; + + return $this; + } + + /** + * Condensed overview information about the recommendation. + * + * Generated from protobuf field .google.protobuf.Struct overview = 3; + * @return \Google\Protobuf\Struct|null + */ + public function getOverview() + { + return $this->overview; + } + + public function hasOverview() + { + return isset($this->overview); + } + + public function clearOverview() + { + unset($this->overview); + } + + /** + * Condensed overview information about the recommendation. + * + * Generated from protobuf field .google.protobuf.Struct overview = 3; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setOverview($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->overview = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php new file mode 100644 index 000000000000..d85e81828e79 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php @@ -0,0 +1,101 @@ +google.cloud.recommender.v1.RecommendationStateInfo + */ +class RecommendationStateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; + */ + protected $state = 0; + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + */ + private $state_metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + * @type array|\Google\Protobuf\Internal\MapField $state_metadata + * A map of metadata for the state, provided by user or automations systems. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\RecommendationStateInfo\State::class); + $this->state = $var; + + return $this; + } + + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getStateMetadata() + { + return $this->state_metadata; + } + + /** + * A map of metadata for the state, provided by user or automations systems. + * + * Generated from protobuf field map state_metadata = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setStateMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->state_metadata = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php new file mode 100644 index 000000000000..13e4a5da871f --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php @@ -0,0 +1,92 @@ +google.cloud.recommender.v1.RecommendationStateInfo.State + */ +class State +{ + /** + * Default state. Don't use directly. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Recommendation is active and can be applied. Recommendations content can + * be updated by Google. + * ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Recommendation is in claimed state. Recommendations content is + * immutable and cannot be updated by Google. + * CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. + * + * Generated from protobuf enum CLAIMED = 6; + */ + const CLAIMED = 6; + /** + * Recommendation is in succeeded state. Recommendations content is + * immutable and cannot be updated by Google. + * SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * Recommendation is in failed state. Recommendations content is immutable + * and cannot be updated by Google. + * FAILED recommendations can be marked as SUCCEEDED, or FAILED. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * Recommendation is in dismissed state. Recommendation content can be + * updated by Google. + * DISMISSED recommendations can be marked as ACTIVE. + * + * Generated from protobuf enum DISMISSED = 5; + */ + const DISMISSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CLAIMED => 'CLAIMED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::DISMISSED => 'DISMISSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php new file mode 100644 index 000000000000..b000d1dda93c --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php @@ -0,0 +1,347 @@ +google.cloud.recommender.v1.RecommenderConfig + */ +class RecommenderConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of recommender config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * RecommenderGenerationConfig which configures the Generation of + * recommendations for this recommender. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; + */ + protected $recommender_generation_config = null; + /** + * Fingerprint of the RecommenderConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + */ + private $annotations; + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of recommender config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config + * @type \Google\Cloud\Recommender\V1\RecommenderGenerationConfig $recommender_generation_config + * RecommenderGenerationConfig which configures the Generation of + * recommendations for this recommender. + * @type string $etag + * Fingerprint of the RecommenderConfig. Provides optimistic locking when + * updating. + * @type \Google\Protobuf\Timestamp $update_time + * Last time when the config was updated. + * @type string $revision_id + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * @type string $display_name + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderConfig::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of recommender config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of recommender config. + * Eg, + * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * RecommenderGenerationConfig which configures the Generation of + * recommendations for this recommender. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; + * @return \Google\Cloud\Recommender\V1\RecommenderGenerationConfig|null + */ + public function getRecommenderGenerationConfig() + { + return $this->recommender_generation_config; + } + + public function hasRecommenderGenerationConfig() + { + return isset($this->recommender_generation_config); + } + + public function clearRecommenderGenerationConfig() + { + unset($this->recommender_generation_config); + } + + /** + * RecommenderGenerationConfig which configures the Generation of + * recommendations for this recommender. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; + * @param \Google\Cloud\Recommender\V1\RecommenderGenerationConfig $var + * @return $this + */ + public function setRecommenderGenerationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommenderGenerationConfig::class); + $this->recommender_generation_config = $var; + + return $this; + } + + /** + * Fingerprint of the RecommenderConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Fingerprint of the RecommenderConfig. Provides optimistic locking when + * updating. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Last time when the config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the config. + * A new revision is committed whenever the config is changed in any way. + * The format is an 8-character hexadecimal string. + * + * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Allows clients to store small amounts of arbitrary data. Annotations must + * follow the Kubernetes syntax. + * The total size of all keys and values combined is limited to 256k. + * Key can have 2 segments: prefix (optional) and name (required), + * separated by a slash (/). + * Prefix must be a DNS subdomain. + * Name must be 63 characters or less, begin and end with alphanumerics, + * with dashes (-), underscores (_), dots (.), and alphanumerics between. + * + * Generated from protobuf field map annotations = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A user-settable field to provide a human-readable name to be used in user + * interfaces. + * + * Generated from protobuf field string display_name = 7; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php new file mode 100644 index 000000000000..61338b71a7e5 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php @@ -0,0 +1,83 @@ +google.cloud.recommender.v1.RecommenderGenerationConfig + */ +class RecommenderGenerationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters for this RecommenderGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + */ + protected $params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $params + * Parameters for this RecommenderGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderConfig::initOnce(); + parent::__construct($data); + } + + /** + * Parameters for this RecommenderGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getParams() + { + return $this->params; + } + + public function hasParams() + { + return isset($this->params); + } + + public function clearParams() + { + unset($this->params); + } + + /** + * Parameters for this RecommenderGenerationConfig. These configs can be used + * by or are applied to all subtypes. + * + * Generated from protobuf field .google.protobuf.Struct params = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setParams($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php new file mode 100644 index 000000000000..53a441676894 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php @@ -0,0 +1,111 @@ +google.cloud.recommender.v1.ReliabilityProjection + */ +class ReliabilityProjection extends \Google\Protobuf\Internal\Message +{ + /** + * Reliability risks mitigated by this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; + */ + private $risks; + /** + * Per-recommender projection. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[] $risks + * Reliability risks mitigated by this recommendation. + * @type \Google\Protobuf\Struct $details + * Per-recommender projection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Reliability risks mitigated by this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; + * @return RepeatedField + */ + public function getRisks() + { + return $this->risks; + } + + /** + * Reliability risks mitigated by this recommendation. + * + * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; + * @param int[] $var + * @return $this + */ + public function setRisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Recommender\V1\ReliabilityProjection\RiskType::class); + $this->risks = $arr; + + return $this; + } + + /** + * Per-recommender projection. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Per-recommender projection. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php new file mode 100644 index 000000000000..be85f388417a --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php @@ -0,0 +1,69 @@ +google.cloud.recommender.v1.ReliabilityProjection.RiskType + */ +class RiskType +{ + /** + * Default unspecified risk. Don't use directly. + * + * Generated from protobuf enum RISK_TYPE_UNSPECIFIED = 0; + */ + const RISK_TYPE_UNSPECIFIED = 0; + /** + * Potential service downtime. + * + * Generated from protobuf enum SERVICE_DISRUPTION = 1; + */ + const SERVICE_DISRUPTION = 1; + /** + * Potential data loss. + * + * Generated from protobuf enum DATA_LOSS = 2; + */ + const DATA_LOSS = 2; + /** + * Potential access denial. The service is still up but some or all clients + * can't access it. + * + * Generated from protobuf enum ACCESS_DENY = 3; + */ + const ACCESS_DENY = 3; + + private static $valueToName = [ + self::RISK_TYPE_UNSPECIFIED => 'RISK_TYPE_UNSPECIFIED', + self::SERVICE_DISRUPTION => 'SERVICE_DISRUPTION', + self::DATA_LOSS => 'DATA_LOSS', + self::ACCESS_DENY => 'ACCESS_DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php new file mode 100644 index 000000000000..a41ea471c7a4 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php @@ -0,0 +1,77 @@ +google.cloud.recommender.v1.SecurityProjection + */ +class SecurityProjection extends \Google\Protobuf\Internal\Message +{ + /** + * Additional security impact details that is provided by the recommender. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + */ + protected $details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $details + * Additional security impact details that is provided by the recommender. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Additional security impact details that is provided by the recommender. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Additional security impact details that is provided by the recommender. + * + * Generated from protobuf field .google.protobuf.Struct details = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php new file mode 100644 index 000000000000..66bc39171c61 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php @@ -0,0 +1,116 @@ +google.cloud.recommender.v1.SustainabilityProjection + */ +class SustainabilityProjection extends \Google\Protobuf\Internal\Message +{ + /** + * Carbon Footprint generated in kg of CO2 equivalent. + * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). + * + * Generated from protobuf field double kg_c_o2e = 1; + */ + protected $kg_c_o2e = 0.0; + /** + * Duration for which this sustainability applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $kg_c_o2e + * Carbon Footprint generated in kg of CO2 equivalent. + * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). + * @type \Google\Protobuf\Duration $duration + * Duration for which this sustainability applies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * Carbon Footprint generated in kg of CO2 equivalent. + * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). + * + * Generated from protobuf field double kg_c_o2e = 1; + * @return float + */ + public function getKgCO2E() + { + return $this->kg_c_o2e; + } + + /** + * Carbon Footprint generated in kg of CO2 equivalent. + * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). + * + * Generated from protobuf field double kg_c_o2e = 1; + * @param float $var + * @return $this + */ + public function setKgCO2E($var) + { + GPBUtil::checkDouble($var); + $this->kg_c_o2e = $var; + + return $this; + } + + /** + * Duration for which this sustainability applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration for which this sustainability applies. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php new file mode 100644 index 000000000000..e95f6c77f1b5 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php @@ -0,0 +1,174 @@ +google.cloud.recommender.v1.UpdateInsightTypeConfigRequest + */ +class UpdateInsightTypeConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The InsightTypeConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $insight_type_config = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Recommender\V1\InsightTypeConfig $insightTypeConfig Required. The InsightTypeConfig to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Recommender\V1\UpdateInsightTypeConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Recommender\V1\InsightTypeConfig $insightTypeConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInsightTypeConfig($insightTypeConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\InsightTypeConfig $insight_type_config + * Required. The InsightTypeConfig to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * @type bool $validate_only + * If true, validate the request and preview the change, but do not actually + * update it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The InsightTypeConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Recommender\V1\InsightTypeConfig|null + */ + public function getInsightTypeConfig() + { + return $this->insight_type_config; + } + + public function hasInsightTypeConfig() + { + return isset($this->insight_type_config); + } + + public function clearInsightTypeConfig() + { + unset($this->insight_type_config); + } + + /** + * Required. The InsightTypeConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Recommender\V1\InsightTypeConfig $var + * @return $this + */ + public function setInsightTypeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightTypeConfig::class); + $this->insight_type_config = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php new file mode 100644 index 000000000000..630f76c5db09 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php @@ -0,0 +1,174 @@ +google.cloud.recommender.v1.UpdateRecommenderConfigRequest + */ +class UpdateRecommenderConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RecommenderConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $recommender_config = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Recommender\V1\RecommenderConfig $recommenderConfig Required. The RecommenderConfig to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Recommender\V1\UpdateRecommenderConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Recommender\V1\RecommenderConfig $recommenderConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRecommenderConfig($recommenderConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Recommender\V1\RecommenderConfig $recommender_config + * Required. The RecommenderConfig to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * @type bool $validate_only + * If true, validate the request and preview the change, but do not actually + * update it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RecommenderConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Recommender\V1\RecommenderConfig|null + */ + public function getRecommenderConfig() + { + return $this->recommender_config; + } + + public function hasRecommenderConfig() + { + return isset($this->recommender_config); + } + + public function clearRecommenderConfig() + { + unset($this->recommender_config); + } + + /** + * Required. The RecommenderConfig to update. + * + * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Recommender\V1\RecommenderConfig $var + * @return $this + */ + public function setRecommenderConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommenderConfig::class); + $this->recommender_config = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If true, validate the request and preview the change, but do not actually + * update it. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php new file mode 100644 index 000000000000..6a14eada8bb4 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php @@ -0,0 +1,81 @@ +google.cloud.recommender.v1.ValueMatcher + */ +class ValueMatcher extends \Google\Protobuf\Internal\Message +{ + protected $match_variant; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $matches_pattern + * 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 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); + parent::__construct($data); + } + + /** + * 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 + * + * Generated from protobuf field string matches_pattern = 1; + * @return string + */ + public function getMatchesPattern() + { + return $this->readOneof(1); + } + + public function hasMatchesPattern() + { + return $this->hasOneof(1); + } + + /** + * 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 + * + * Generated from protobuf field string matches_pattern = 1; + * @param string $var + * @return $this + */ + public function setMatchesPattern($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getMatchVariant() + { + return $this->whichOneof("match_variant"); + } + +} + diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php new file mode 100644 index 000000000000..92e051a5b9de --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Insight $response */ + $response = $recommenderClient->getInsight($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::insightName( + '[PROJECT]', + '[LOCATION]', + '[INSIGHT_TYPE]', + '[INSIGHT]' + ); + + get_insight_sample($formattedName); +} +// [END recommender_v1_generated_Recommender_GetInsight_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php new file mode 100644 index 000000000000..a0716a43e20a --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var InsightTypeConfig $response */ + $response = $recommenderClient->getInsightTypeConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::insightTypeConfigName( + '[PROJECT]', + '[LOCATION]', + '[INSIGHT_TYPE]' + ); + + get_insight_type_config_sample($formattedName); +} +// [END recommender_v1_generated_Recommender_GetInsightTypeConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php new file mode 100644 index 000000000000..9c626708f452 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Recommendation $response */ + $response = $recommenderClient->getRecommendation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommendationName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]', + '[RECOMMENDATION]' + ); + + get_recommendation_sample($formattedName); +} +// [END recommender_v1_generated_Recommender_GetRecommendation_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php new file mode 100644 index 000000000000..7bdc82c63f8b --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RecommenderConfig $response */ + $response = $recommenderClient->getRecommenderConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommenderConfigName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]' + ); + + get_recommender_config_sample($formattedName); +} +// [END recommender_v1_generated_Recommender_GetRecommenderConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php new file mode 100644 index 000000000000..b111a0bfa576 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php @@ -0,0 +1,93 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recommenderClient->listInsights($request); + + /** @var Insight $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = RecommenderClient::insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); + + list_insights_sample($formattedParent); +} +// [END recommender_v1_generated_Recommender_ListInsights_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php new file mode 100644 index 000000000000..83af7cf37aa2 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php @@ -0,0 +1,93 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $recommenderClient->listRecommendations($request); + + /** @var Recommendation $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = RecommenderClient::recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); + + list_recommendations_sample($formattedParent); +} +// [END recommender_v1_generated_Recommender_ListRecommendations_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php new file mode 100644 index 000000000000..e3ed8e2d68b9 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php @@ -0,0 +1,84 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + /** @var Insight $response */ + $response = $recommenderClient->markInsightAccepted($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::insightName( + '[PROJECT]', + '[LOCATION]', + '[INSIGHT_TYPE]', + '[INSIGHT]' + ); + $etag = '[ETAG]'; + + mark_insight_accepted_sample($formattedName, $etag); +} +// [END recommender_v1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php new file mode 100644 index 000000000000..ea094fe5d442 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + /** @var Recommendation $response */ + $response = $recommenderClient->markRecommendationClaimed($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommendationName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]', + '[RECOMMENDATION]' + ); + $etag = '[ETAG]'; + + mark_recommendation_claimed_sample($formattedName, $etag); +} +// [END recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php new file mode 100644 index 000000000000..20c60f651574 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Recommendation $response */ + $response = $recommenderClient->markRecommendationDismissed($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommendationName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]', + '[RECOMMENDATION]' + ); + + mark_recommendation_dismissed_sample($formattedName); +} +// [END recommender_v1_generated_Recommender_MarkRecommendationDismissed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php new file mode 100644 index 000000000000..0cfa4b30d2e0 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php @@ -0,0 +1,89 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + /** @var Recommendation $response */ + $response = $recommenderClient->markRecommendationFailed($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommendationName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]', + '[RECOMMENDATION]' + ); + $etag = '[ETAG]'; + + mark_recommendation_failed_sample($formattedName, $etag); +} +// [END recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php new file mode 100644 index 000000000000..886783151678 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php @@ -0,0 +1,89 @@ +setName($formattedName) + ->setEtag($etag); + + // Call the API and handle any network failures. + try { + /** @var Recommendation $response */ + $response = $recommenderClient->markRecommendationSucceeded($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = RecommenderClient::recommendationName( + '[PROJECT]', + '[LOCATION]', + '[RECOMMENDER]', + '[RECOMMENDATION]' + ); + $etag = '[ETAG]'; + + mark_recommendation_succeeded_sample($formattedName, $etag); +} +// [END recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php new file mode 100644 index 000000000000..67d4e6aec5b3 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php @@ -0,0 +1,60 @@ +setInsightTypeConfig($insightTypeConfig); + + // Call the API and handle any network failures. + try { + /** @var InsightTypeConfig $response */ + $response = $recommenderClient->updateInsightTypeConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END recommender_v1_generated_Recommender_UpdateInsightTypeConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php new file mode 100644 index 000000000000..e3ca4744d587 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php @@ -0,0 +1,60 @@ +setRecommenderConfig($recommenderConfig); + + // Call the API and handle any network failures. + try { + /** @var RecommenderConfig $response */ + $response = $recommenderClient->updateRecommenderConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END recommender_v1_generated_Recommender_UpdateRecommenderConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php b/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php new file mode 100644 index 000000000000..17b0835a1eb6 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php @@ -0,0 +1,1211 @@ + getInsightAsync(GetInsightRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInsightTypeConfigAsync(GetInsightTypeConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRecommendationAsync(GetRecommendationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRecommenderConfigAsync(GetRecommenderConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInsightsAsync(ListInsightsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRecommendationsAsync(ListRecommendationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface markInsightAcceptedAsync(MarkInsightAcceptedRequest $request, array $optionalArgs = []) + * @method PromiseInterface markRecommendationClaimedAsync(MarkRecommendationClaimedRequest $request, array $optionalArgs = []) + * @method PromiseInterface markRecommendationDismissedAsync(MarkRecommendationDismissedRequest $request, array $optionalArgs = []) + * @method PromiseInterface markRecommendationFailedAsync(MarkRecommendationFailedRequest $request, array $optionalArgs = []) + * @method PromiseInterface markRecommendationSucceededAsync(MarkRecommendationSucceededRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRecommenderConfigAsync(UpdateRecommenderConfigRequest $request, array $optionalArgs = []) + */ +final class RecommenderClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.recommender.v1.Recommender'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'recommender.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'recommender.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/recommender_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/recommender_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/recommender_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/recommender_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_insight_type resource. + * + * @param string $billingAccount + * @param string $location + * @param string $insightType + * + * @return string The formatted billing_account_location_insight_type resource. + */ + public static function billingAccountLocationInsightTypeName(string $billingAccount, string $location, string $insightType): string + { + return self::getPathTemplate('billingAccountLocationInsightType')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_insight_type_config resource. + * + * @param string $billingAccount + * @param string $location + * @param string $insightType + * + * @return string The formatted billing_account_location_insight_type_config resource. + */ + public static function billingAccountLocationInsightTypeConfigName(string $billingAccount, string $location, string $insightType): string + { + return self::getPathTemplate('billingAccountLocationInsightTypeConfig')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_insight_type_insight resource. + * + * @param string $billingAccount + * @param string $location + * @param string $insightType + * @param string $insight + * + * @return string The formatted billing_account_location_insight_type_insight resource. + */ + public static function billingAccountLocationInsightTypeInsightName(string $billingAccount, string $location, string $insightType, string $insight): string + { + return self::getPathTemplate('billingAccountLocationInsightTypeInsight')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'insight_type' => $insightType, + 'insight' => $insight, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_recommender resource. + * + * @param string $billingAccount + * @param string $location + * @param string $recommender + * + * @return string The formatted billing_account_location_recommender resource. + */ + public static function billingAccountLocationRecommenderName(string $billingAccount, string $location, string $recommender): string + { + return self::getPathTemplate('billingAccountLocationRecommender')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_recommender_config resource. + * + * @param string $billingAccount + * @param string $location + * @param string $recommender + * + * @return string The formatted billing_account_location_recommender_config resource. + */ + public static function billingAccountLocationRecommenderConfigName(string $billingAccount, string $location, string $recommender): string + { + return self::getPathTemplate('billingAccountLocationRecommenderConfig')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_recommender_recommendation resource. + * + * @param string $billingAccount + * @param string $location + * @param string $recommender + * @param string $recommendation + * + * @return string The formatted billing_account_location_recommender_recommendation resource. + */ + public static function billingAccountLocationRecommenderRecommendationName(string $billingAccount, string $location, string $recommender, string $recommendation): string + { + return self::getPathTemplate('billingAccountLocationRecommenderRecommendation')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'recommender' => $recommender, + 'recommendation' => $recommendation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_insight_type resource. + * + * @param string $folder + * @param string $location + * @param string $insightType + * + * @return string The formatted folder_location_insight_type resource. + */ + public static function folderLocationInsightTypeName(string $folder, string $location, string $insightType): string + { + return self::getPathTemplate('folderLocationInsightType')->render([ + 'folder' => $folder, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_insight_type_insight resource. + * + * @param string $folder + * @param string $location + * @param string $insightType + * @param string $insight + * + * @return string The formatted folder_location_insight_type_insight resource. + */ + public static function folderLocationInsightTypeInsightName(string $folder, string $location, string $insightType, string $insight): string + { + return self::getPathTemplate('folderLocationInsightTypeInsight')->render([ + 'folder' => $folder, + 'location' => $location, + 'insight_type' => $insightType, + 'insight' => $insight, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_recommender resource. + * + * @param string $folder + * @param string $location + * @param string $recommender + * + * @return string The formatted folder_location_recommender resource. + */ + public static function folderLocationRecommenderName(string $folder, string $location, string $recommender): string + { + return self::getPathTemplate('folderLocationRecommender')->render([ + 'folder' => $folder, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_recommender_recommendation resource. + * + * @param string $folder + * @param string $location + * @param string $recommender + * @param string $recommendation + * + * @return string The formatted folder_location_recommender_recommendation resource. + */ + public static function folderLocationRecommenderRecommendationName(string $folder, string $location, string $recommender, string $recommendation): string + { + return self::getPathTemplate('folderLocationRecommenderRecommendation')->render([ + 'folder' => $folder, + 'location' => $location, + 'recommender' => $recommender, + 'recommendation' => $recommendation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a insight + * resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * @param string $insight + * + * @return string The formatted insight resource. + */ + public static function insightName(string $project, string $location, string $insightType, string $insight): string + { + return self::getPathTemplate('insight')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + 'insight' => $insight, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a insight_type + * resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * + * @return string The formatted insight_type resource. + */ + public static function insightTypeName(string $project, string $location, string $insightType): string + { + return self::getPathTemplate('insightType')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * insight_type_config resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * + * @return string The formatted insight_type_config resource. + */ + public static function insightTypeConfigName(string $project, string $location, string $insightType): string + { + return self::getPathTemplate('insightTypeConfig')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_insight_type resource. + * + * @param string $organization + * @param string $location + * @param string $insightType + * + * @return string The formatted organization_location_insight_type resource. + */ + public static function organizationLocationInsightTypeName(string $organization, string $location, string $insightType): string + { + return self::getPathTemplate('organizationLocationInsightType')->render([ + 'organization' => $organization, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_insight_type_config resource. + * + * @param string $organization + * @param string $location + * @param string $insightType + * + * @return string The formatted organization_location_insight_type_config resource. + */ + public static function organizationLocationInsightTypeConfigName(string $organization, string $location, string $insightType): string + { + return self::getPathTemplate('organizationLocationInsightTypeConfig')->render([ + 'organization' => $organization, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_insight_type_insight resource. + * + * @param string $organization + * @param string $location + * @param string $insightType + * @param string $insight + * + * @return string The formatted organization_location_insight_type_insight resource. + */ + public static function organizationLocationInsightTypeInsightName(string $organization, string $location, string $insightType, string $insight): string + { + return self::getPathTemplate('organizationLocationInsightTypeInsight')->render([ + 'organization' => $organization, + 'location' => $location, + 'insight_type' => $insightType, + 'insight' => $insight, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_recommender resource. + * + * @param string $organization + * @param string $location + * @param string $recommender + * + * @return string The formatted organization_location_recommender resource. + */ + public static function organizationLocationRecommenderName(string $organization, string $location, string $recommender): string + { + return self::getPathTemplate('organizationLocationRecommender')->render([ + 'organization' => $organization, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_recommender_config resource. + * + * @param string $organization + * @param string $location + * @param string $recommender + * + * @return string The formatted organization_location_recommender_config resource. + */ + public static function organizationLocationRecommenderConfigName(string $organization, string $location, string $recommender): string + { + return self::getPathTemplate('organizationLocationRecommenderConfig')->render([ + 'organization' => $organization, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_recommender_recommendation resource. + * + * @param string $organization + * @param string $location + * @param string $recommender + * @param string $recommendation + * + * @return string The formatted organization_location_recommender_recommendation resource. + */ + public static function organizationLocationRecommenderRecommendationName(string $organization, string $location, string $recommender, string $recommendation): string + { + return self::getPathTemplate('organizationLocationRecommenderRecommendation')->render([ + 'organization' => $organization, + 'location' => $location, + 'recommender' => $recommender, + 'recommendation' => $recommendation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_insight_type resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * + * @return string The formatted project_location_insight_type resource. + */ + public static function projectLocationInsightTypeName(string $project, string $location, string $insightType): string + { + return self::getPathTemplate('projectLocationInsightType')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_insight_type_config resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * + * @return string The formatted project_location_insight_type_config resource. + */ + public static function projectLocationInsightTypeConfigName(string $project, string $location, string $insightType): string + { + return self::getPathTemplate('projectLocationInsightTypeConfig')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_insight_type_insight resource. + * + * @param string $project + * @param string $location + * @param string $insightType + * @param string $insight + * + * @return string The formatted project_location_insight_type_insight resource. + */ + public static function projectLocationInsightTypeInsightName(string $project, string $location, string $insightType, string $insight): string + { + return self::getPathTemplate('projectLocationInsightTypeInsight')->render([ + 'project' => $project, + 'location' => $location, + 'insight_type' => $insightType, + 'insight' => $insight, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_recommender resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * + * @return string The formatted project_location_recommender resource. + */ + public static function projectLocationRecommenderName(string $project, string $location, string $recommender): string + { + return self::getPathTemplate('projectLocationRecommender')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_recommender_config resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * + * @return string The formatted project_location_recommender_config resource. + */ + public static function projectLocationRecommenderConfigName(string $project, string $location, string $recommender): string + { + return self::getPathTemplate('projectLocationRecommenderConfig')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_recommender_recommendation resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * @param string $recommendation + * + * @return string The formatted project_location_recommender_recommendation resource. + */ + public static function projectLocationRecommenderRecommendationName(string $project, string $location, string $recommender, string $recommendation): string + { + return self::getPathTemplate('projectLocationRecommenderRecommendation')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + 'recommendation' => $recommendation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * recommendation resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * @param string $recommendation + * + * @return string The formatted recommendation resource. + */ + public static function recommendationName(string $project, string $location, string $recommender, string $recommendation): string + { + return self::getPathTemplate('recommendation')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + 'recommendation' => $recommendation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a recommender + * resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * + * @return string The formatted recommender resource. + */ + public static function recommenderName(string $project, string $location, string $recommender): string + { + return self::getPathTemplate('recommender')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * recommender_config resource. + * + * @param string $project + * @param string $location + * @param string $recommender + * + * @return string The formatted recommender_config resource. + */ + public static function recommenderConfigName(string $project, string $location, string $recommender): string + { + return self::getPathTemplate('recommenderConfig')->render([ + 'project' => $project, + 'location' => $location, + 'recommender' => $recommender, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - billingAccountLocationInsightType: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type} + * - billingAccountLocationInsightTypeConfig: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config + * - billingAccountLocationInsightTypeInsight: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight} + * - billingAccountLocationRecommender: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender} + * - billingAccountLocationRecommenderConfig: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config + * - billingAccountLocationRecommenderRecommendation: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + * - folderLocationInsightType: folders/{folder}/locations/{location}/insightTypes/{insight_type} + * - folderLocationInsightTypeInsight: folders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight} + * - folderLocationRecommender: folders/{folder}/locations/{location}/recommenders/{recommender} + * - folderLocationRecommenderRecommendation: folders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + * - insight: projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight} + * - insightType: projects/{project}/locations/{location}/insightTypes/{insight_type} + * - insightTypeConfig: projects/{project}/locations/{location}/insightTypes/{insight_type}/config + * - organizationLocationInsightType: organizations/{organization}/locations/{location}/insightTypes/{insight_type} + * - organizationLocationInsightTypeConfig: organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config + * - organizationLocationInsightTypeInsight: organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight} + * - organizationLocationRecommender: organizations/{organization}/locations/{location}/recommenders/{recommender} + * - organizationLocationRecommenderConfig: organizations/{organization}/locations/{location}/recommenders/{recommender}/config + * - organizationLocationRecommenderRecommendation: organizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + * - projectLocationInsightType: projects/{project}/locations/{location}/insightTypes/{insight_type} + * - projectLocationInsightTypeConfig: projects/{project}/locations/{location}/insightTypes/{insight_type}/config + * - projectLocationInsightTypeInsight: projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight} + * - projectLocationRecommender: projects/{project}/locations/{location}/recommenders/{recommender} + * - projectLocationRecommenderConfig: projects/{project}/locations/{location}/recommenders/{recommender}/config + * - projectLocationRecommenderRecommendation: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + * - recommendation: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} + * - recommender: projects/{project}/locations/{location}/recommenders/{recommender} + * - recommenderConfig: projects/{project}/locations/{location}/recommenders/{recommender}/config + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'recommender.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Recommender\V1\RecommenderClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new RecommenderClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets the requested insight. Requires the recommender.*.get IAM permission + * for the specified insight type. + * + * The async variant is {@see RecommenderClient::getInsightAsync()} . + * + * @example samples/V1/RecommenderClient/get_insight.php + * + * @param GetInsightRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Insight + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInsight(GetInsightRequest $request, array $callOptions = []): Insight + { + return $this->startApiCall('GetInsight', $request, $callOptions)->wait(); + } + + /** + * Gets the requested InsightTypeConfig. There is only one instance of the + * config for each InsightType. + * + * The async variant is {@see RecommenderClient::getInsightTypeConfigAsync()} . + * + * @example samples/V1/RecommenderClient/get_insight_type_config.php + * + * @param GetInsightTypeConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InsightTypeConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInsightTypeConfig(GetInsightTypeConfigRequest $request, array $callOptions = []): InsightTypeConfig + { + return $this->startApiCall('GetInsightTypeConfig', $request, $callOptions)->wait(); + } + + /** + * Gets the requested recommendation. Requires the recommender.*.get + * IAM permission for the specified recommender. + * + * The async variant is {@see RecommenderClient::getRecommendationAsync()} . + * + * @example samples/V1/RecommenderClient/get_recommendation.php + * + * @param GetRecommendationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recommendation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRecommendation(GetRecommendationRequest $request, array $callOptions = []): Recommendation + { + return $this->startApiCall('GetRecommendation', $request, $callOptions)->wait(); + } + + /** + * Gets the requested Recommender Config. There is only one instance of the + * config for each Recommender. + * + * The async variant is {@see RecommenderClient::getRecommenderConfigAsync()} . + * + * @example samples/V1/RecommenderClient/get_recommender_config.php + * + * @param GetRecommenderConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RecommenderConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRecommenderConfig(GetRecommenderConfigRequest $request, array $callOptions = []): RecommenderConfig + { + return $this->startApiCall('GetRecommenderConfig', $request, $callOptions)->wait(); + } + + /** + * Lists insights for the specified Cloud Resource. Requires the + * recommender.*.list IAM permission for the specified insight type. + * + * The async variant is {@see RecommenderClient::listInsightsAsync()} . + * + * @example samples/V1/RecommenderClient/list_insights.php + * + * @param ListInsightsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInsights(ListInsightsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInsights', $request, $callOptions); + } + + /** + * Lists recommendations for the specified Cloud Resource. Requires the + * recommender.*.list IAM permission for the specified recommender. + * + * The async variant is {@see RecommenderClient::listRecommendationsAsync()} . + * + * @example samples/V1/RecommenderClient/list_recommendations.php + * + * @param ListRecommendationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRecommendations(ListRecommendationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRecommendations', $request, $callOptions); + } + + /** + * Marks the Insight State as Accepted. Users can use this method to + * indicate to the Recommender API that they have applied some action based + * on the insight. This stops the insight content from being updated. + * + * MarkInsightAccepted can be applied to insights in ACTIVE state. Requires + * the recommender.*.update IAM permission for the specified insight. + * + * The async variant is {@see RecommenderClient::markInsightAcceptedAsync()} . + * + * @example samples/V1/RecommenderClient/mark_insight_accepted.php + * + * @param MarkInsightAcceptedRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Insight + * + * @throws ApiException Thrown if the API call fails. + */ + public function markInsightAccepted(MarkInsightAcceptedRequest $request, array $callOptions = []): Insight + { + return $this->startApiCall('MarkInsightAccepted', $request, $callOptions)->wait(); + } + + /** + * Marks the Recommendation State as Claimed. Users can use this method to + * indicate to the Recommender API that they are starting to apply the + * recommendation themselves. This stops the recommendation content from being + * updated. Associated insights are frozen and placed in the ACCEPTED state. + * + * MarkRecommendationClaimed can be applied to recommendations in CLAIMED, + * SUCCEEDED, FAILED, or ACTIVE state. + * + * Requires the recommender.*.update IAM permission for the specified + * recommender. + * + * The async variant is {@see RecommenderClient::markRecommendationClaimedAsync()} + * . + * + * @example samples/V1/RecommenderClient/mark_recommendation_claimed.php + * + * @param MarkRecommendationClaimedRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recommendation + * + * @throws ApiException Thrown if the API call fails. + */ + public function markRecommendationClaimed(MarkRecommendationClaimedRequest $request, array $callOptions = []): Recommendation + { + return $this->startApiCall('MarkRecommendationClaimed', $request, $callOptions)->wait(); + } + + /** + * Mark the Recommendation State as Dismissed. Users can use this method to + * indicate to the Recommender API that an ACTIVE recommendation has to + * be marked back as DISMISSED. + * + * MarkRecommendationDismissed can be applied to recommendations in ACTIVE + * state. + * + * Requires the recommender.*.update IAM permission for the specified + * recommender. + * + * The async variant is + * {@see RecommenderClient::markRecommendationDismissedAsync()} . + * + * @example samples/V1/RecommenderClient/mark_recommendation_dismissed.php + * + * @param MarkRecommendationDismissedRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recommendation + * + * @throws ApiException Thrown if the API call fails. + */ + public function markRecommendationDismissed(MarkRecommendationDismissedRequest $request, array $callOptions = []): Recommendation + { + return $this->startApiCall('MarkRecommendationDismissed', $request, $callOptions)->wait(); + } + + /** + * Marks the Recommendation State as Failed. Users can use this method to + * indicate to the Recommender API that they have applied the recommendation + * themselves, and the operation failed. This stops the recommendation content + * from being updated. Associated insights are frozen and placed in the + * ACCEPTED state. + * + * MarkRecommendationFailed can be applied to recommendations in ACTIVE, + * CLAIMED, SUCCEEDED, or FAILED state. + * + * Requires the recommender.*.update IAM permission for the specified + * recommender. + * + * The async variant is {@see RecommenderClient::markRecommendationFailedAsync()} . + * + * @example samples/V1/RecommenderClient/mark_recommendation_failed.php + * + * @param MarkRecommendationFailedRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recommendation + * + * @throws ApiException Thrown if the API call fails. + */ + public function markRecommendationFailed(MarkRecommendationFailedRequest $request, array $callOptions = []): Recommendation + { + return $this->startApiCall('MarkRecommendationFailed', $request, $callOptions)->wait(); + } + + /** + * Marks the Recommendation State as Succeeded. Users can use this method to + * indicate to the Recommender API that they have applied the recommendation + * themselves, and the operation was successful. This stops the recommendation + * content from being updated. Associated insights are frozen and placed in + * the ACCEPTED state. + * + * MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, + * CLAIMED, SUCCEEDED, or FAILED state. + * + * Requires the recommender.*.update IAM permission for the specified + * recommender. + * + * The async variant is + * {@see RecommenderClient::markRecommendationSucceededAsync()} . + * + * @example samples/V1/RecommenderClient/mark_recommendation_succeeded.php + * + * @param MarkRecommendationSucceededRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recommendation + * + * @throws ApiException Thrown if the API call fails. + */ + public function markRecommendationSucceeded(MarkRecommendationSucceededRequest $request, array $callOptions = []): Recommendation + { + return $this->startApiCall('MarkRecommendationSucceeded', $request, $callOptions)->wait(); + } + + /** + * Updates an InsightTypeConfig change. This will create a new revision of the + * config. + * + * The async variant is {@see RecommenderClient::updateInsightTypeConfigAsync()} . + * + * @example samples/V1/RecommenderClient/update_insight_type_config.php + * + * @param UpdateInsightTypeConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InsightTypeConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInsightTypeConfig(UpdateInsightTypeConfigRequest $request, array $callOptions = []): InsightTypeConfig + { + return $this->startApiCall('UpdateInsightTypeConfig', $request, $callOptions)->wait(); + } + + /** + * Updates a Recommender Config. This will create a new revision of the + * config. + * + * The async variant is {@see RecommenderClient::updateRecommenderConfigAsync()} . + * + * @example samples/V1/RecommenderClient/update_recommender_config.php + * + * @param UpdateRecommenderConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RecommenderConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRecommenderConfig(UpdateRecommenderConfigRequest $request, array $callOptions = []): RecommenderConfig + { + return $this->startApiCall('UpdateRecommenderConfig', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..61d8a5fabcf4 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.recommender.v1", + "libraryPackage": "Google\\Cloud\\Recommender\\V1", + "services": { + "Recommender": { + "clients": { + "grpc": { + "libraryClient": "RecommenderGapicClient", + "rpcs": { + "GetInsight": { + "methods": [ + "getInsight" + ] + }, + "GetInsightTypeConfig": { + "methods": [ + "getInsightTypeConfig" + ] + }, + "GetRecommendation": { + "methods": [ + "getRecommendation" + ] + }, + "GetRecommenderConfig": { + "methods": [ + "getRecommenderConfig" + ] + }, + "ListInsights": { + "methods": [ + "listInsights" + ] + }, + "ListRecommendations": { + "methods": [ + "listRecommendations" + ] + }, + "MarkInsightAccepted": { + "methods": [ + "markInsightAccepted" + ] + }, + "MarkRecommendationClaimed": { + "methods": [ + "markRecommendationClaimed" + ] + }, + "MarkRecommendationDismissed": { + "methods": [ + "markRecommendationDismissed" + ] + }, + "MarkRecommendationFailed": { + "methods": [ + "markRecommendationFailed" + ] + }, + "MarkRecommendationSucceeded": { + "methods": [ + "markRecommendationSucceeded" + ] + }, + "UpdateInsightTypeConfig": { + "methods": [ + "updateInsightTypeConfig" + ] + }, + "UpdateRecommenderConfig": { + "methods": [ + "updateRecommenderConfig" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json new file mode 100644 index 000000000000..4b79a146a7c0 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json @@ -0,0 +1,110 @@ +{ + "interfaces": { + "google.cloud.recommender.v1.Recommender": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetInsight": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInsightTypeConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRecommendation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRecommenderConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInsights": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRecommendations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MarkInsightAccepted": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "MarkRecommendationClaimed": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "MarkRecommendationDismissed": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "MarkRecommendationFailed": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "MarkRecommendationSucceeded": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInsightTypeConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateRecommenderConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php new file mode 100644 index 000000000000..317b091eff87 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php @@ -0,0 +1,232 @@ + [ + 'google.cloud.recommender.v1.Recommender' => [ + 'GetInsight' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Insight', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInsightTypeConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\InsightTypeConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRecommendation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRecommenderConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\RecommenderConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInsights' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInsights', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\ListInsightsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRecommendations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRecommendations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\ListRecommendationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'MarkInsightAccepted' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Insight', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationClaimed' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationDismissed' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationFailed' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationSucceeded' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInsightTypeConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\InsightTypeConfig', + 'headerParams' => [ + [ + 'keyName' => 'insight_type_config.name', + 'fieldAccessors' => [ + 'getInsightTypeConfig', + 'getName', + ], + ], + ], + ], + 'UpdateRecommenderConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Recommender\V1\RecommenderConfig', + 'headerParams' => [ + [ + 'keyName' => 'recommender_config.name', + 'fieldAccessors' => [ + 'getRecommenderConfig', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'billingAccountLocationInsightType' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}', + 'billingAccountLocationInsightTypeConfig' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config', + 'billingAccountLocationInsightTypeInsight' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', + 'billingAccountLocationRecommender' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}', + 'billingAccountLocationRecommenderConfig' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config', + 'billingAccountLocationRecommenderRecommendation' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', + 'folderLocationInsightType' => 'folders/{folder}/locations/{location}/insightTypes/{insight_type}', + 'folderLocationInsightTypeInsight' => 'folders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', + 'folderLocationRecommender' => 'folders/{folder}/locations/{location}/recommenders/{recommender}', + 'folderLocationRecommenderRecommendation' => 'folders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', + 'insight' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', + 'insightType' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}', + 'insightTypeConfig' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/config', + 'organizationLocationInsightType' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}', + 'organizationLocationInsightTypeConfig' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config', + 'organizationLocationInsightTypeInsight' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', + 'organizationLocationRecommender' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}', + 'organizationLocationRecommenderConfig' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}/config', + 'organizationLocationRecommenderRecommendation' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', + 'projectLocationInsightType' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}', + 'projectLocationInsightTypeConfig' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/config', + 'projectLocationInsightTypeInsight' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', + 'projectLocationRecommender' => 'projects/{project}/locations/{location}/recommenders/{recommender}', + 'projectLocationRecommenderConfig' => 'projects/{project}/locations/{location}/recommenders/{recommender}/config', + 'projectLocationRecommenderRecommendation' => 'projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', + 'recommendation' => 'projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', + 'recommender' => 'projects/{project}/locations/{location}/recommenders/{recommender}', + 'recommenderConfig' => 'projects/{project}/locations/{location}/recommenders/{recommender}/config', + ], + ], + ], +]; diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php new file mode 100644 index 000000000000..c307f800d934 --- /dev/null +++ b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php @@ -0,0 +1,366 @@ + [ + 'google.cloud.recommender.v1.Recommender' => [ + 'GetInsight' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInsightTypeConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/config}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/config}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/config}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRecommendation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRecommenderConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/config}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/config}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/config}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInsights' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/insightTypes/*}/insights', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=billingAccounts/*/locations/*/insightTypes/*}/insights', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*/insightTypes/*}/insights', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/insightTypes/*}/insights', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRecommendations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/recommenders/*}/recommendations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=billingAccounts/*/locations/*/recommenders/*}/recommendations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=folders/*/locations/*/recommenders/*}/recommendations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/recommenders/*}/recommendations', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MarkInsightAccepted' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}:markAccepted', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}:markAccepted', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}:markAccepted', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationClaimed' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markClaimed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markClaimed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markClaimed', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationDismissed' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markDismissed', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markDismissed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markDismissed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markDismissed', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationFailed' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markFailed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markFailed', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markFailed', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'MarkRecommendationSucceeded' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInsightTypeConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{insight_type_config.name=projects/*/locations/*/insightTypes/*/config}', + 'body' => 'insight_type_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{insight_type_config.name=organizations/*/locations/*/insightTypes/*/config}', + 'body' => 'insight_type_config', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{insight_type_config.name=billingAccounts/*/locations/*/insightTypes/*/config}', + 'body' => 'insight_type_config', + ], + ], + 'placeholders' => [ + 'insight_type_config.name' => [ + 'getters' => [ + 'getInsightTypeConfig', + 'getName', + ], + ], + ], + ], + 'UpdateRecommenderConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{recommender_config.name=projects/*/locations/*/recommenders/*/config}', + 'body' => 'recommender_config', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{recommender_config.name=organizations/*/locations/*/recommenders/*/config}', + 'body' => 'recommender_config', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{recommender_config.name=billingAccounts/*/locations/*/recommenders/*/config}', + 'body' => 'recommender_config', + ], + ], + 'placeholders' => [ + 'recommender_config.name' => [ + 'getters' => [ + 'getRecommenderConfig', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php b/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php new file mode 100644 index 000000000000..bb41707d4bac --- /dev/null +++ b/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php @@ -0,0 +1,1062 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RecommenderClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecommenderClient($options); + } + + /** @test */ + public function getInsightTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $insightSubtype = 'insightSubtype-1491142701'; + $etag = 'etag3123477'; + $expectedResponse = new Insight(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setInsightSubtype($insightSubtype); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); + $request = (new GetInsightRequest()) + ->setName($formattedName); + $response = $gapicClient->getInsight($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsight', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInsightExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); + $request = (new GetInsightRequest()) + ->setName($formattedName); + try { + $gapicClient->getInsight($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInsightTypeConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $expectedResponse = new InsightTypeConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->insightTypeConfigName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); + $request = (new GetInsightTypeConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getInsightTypeConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsightTypeConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInsightTypeConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->insightTypeConfigName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); + $request = (new GetInsightTypeConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getInsightTypeConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecommendationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $recommenderSubtype = 'recommenderSubtype-1488504412'; + $etag = 'etag3123477'; + $xorGroupId = 'xorGroupId381095487'; + $expectedResponse = new Recommendation(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRecommenderSubtype($recommenderSubtype); + $expectedResponse->setEtag($etag); + $expectedResponse->setXorGroupId($xorGroupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $request = (new GetRecommendationRequest()) + ->setName($formattedName); + $response = $gapicClient->getRecommendation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/GetRecommendation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecommendationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $request = (new GetRecommendationRequest()) + ->setName($formattedName); + try { + $gapicClient->getRecommendation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecommenderConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $expectedResponse = new RecommenderConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommenderConfigName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); + $request = (new GetRecommenderConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getRecommenderConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/GetRecommenderConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecommenderConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommenderConfigName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); + $request = (new GetRecommenderConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getRecommenderConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInsightsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $insightsElement = new Insight(); + $insights = [ + $insightsElement, + ]; + $expectedResponse = new ListInsightsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInsights($insights); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); + $request = (new ListInsightsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInsights($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInsights()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/ListInsights', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInsightsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); + $request = (new ListInsightsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInsights($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRecommendationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $recommendationsElement = new Recommendation(); + $recommendations = [ + $recommendationsElement, + ]; + $expectedResponse = new ListRecommendationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRecommendations($recommendations); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); + $request = (new ListRecommendationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRecommendations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRecommendations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/ListRecommendations', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRecommendationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); + $request = (new ListRecommendationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRecommendations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markInsightAcceptedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $insightSubtype = 'insightSubtype-1491142701'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Insight(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setInsightSubtype($insightSubtype); + $expectedResponse->setEtag($etag2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); + $etag = 'etag3123477'; + $request = (new MarkInsightAcceptedRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->markInsightAccepted($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkInsightAccepted', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markInsightAcceptedExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); + $etag = 'etag3123477'; + $request = (new MarkInsightAcceptedRequest()) + ->setName($formattedName) + ->setEtag($etag); + try { + $gapicClient->markInsightAccepted($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationClaimedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $recommenderSubtype = 'recommenderSubtype-1488504412'; + $etag2 = 'etag2-1293302904'; + $xorGroupId = 'xorGroupId381095487'; + $expectedResponse = new Recommendation(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRecommenderSubtype($recommenderSubtype); + $expectedResponse->setEtag($etag2); + $expectedResponse->setXorGroupId($xorGroupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationClaimedRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->markRecommendationClaimed($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationClaimed', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationClaimedExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationClaimedRequest()) + ->setName($formattedName) + ->setEtag($etag); + try { + $gapicClient->markRecommendationClaimed($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationDismissedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $recommenderSubtype = 'recommenderSubtype-1488504412'; + $etag2 = 'etag2-1293302904'; + $xorGroupId = 'xorGroupId381095487'; + $expectedResponse = new Recommendation(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRecommenderSubtype($recommenderSubtype); + $expectedResponse->setEtag($etag2); + $expectedResponse->setXorGroupId($xorGroupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $request = (new MarkRecommendationDismissedRequest()) + ->setName($formattedName); + $response = $gapicClient->markRecommendationDismissed($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationDismissed', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationDismissedExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $request = (new MarkRecommendationDismissedRequest()) + ->setName($formattedName); + try { + $gapicClient->markRecommendationDismissed($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationFailedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $recommenderSubtype = 'recommenderSubtype-1488504412'; + $etag2 = 'etag2-1293302904'; + $xorGroupId = 'xorGroupId381095487'; + $expectedResponse = new Recommendation(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRecommenderSubtype($recommenderSubtype); + $expectedResponse->setEtag($etag2); + $expectedResponse->setXorGroupId($xorGroupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationFailedRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->markRecommendationFailed($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationFailed', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationFailedExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationFailedRequest()) + ->setName($formattedName) + ->setEtag($etag); + try { + $gapicClient->markRecommendationFailed($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationSucceededTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $recommenderSubtype = 'recommenderSubtype-1488504412'; + $etag2 = 'etag2-1293302904'; + $xorGroupId = 'xorGroupId381095487'; + $expectedResponse = new Recommendation(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRecommenderSubtype($recommenderSubtype); + $expectedResponse->setEtag($etag2); + $expectedResponse->setXorGroupId($xorGroupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationSucceededRequest()) + ->setName($formattedName) + ->setEtag($etag); + $response = $gapicClient->markRecommendationSucceeded($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationSucceeded', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getEtag(); + $this->assertProtobufEquals($etag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function markRecommendationSucceededExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); + $etag = 'etag3123477'; + $request = (new MarkRecommendationSucceededRequest()) + ->setName($formattedName) + ->setEtag($etag); + try { + $gapicClient->markRecommendationSucceeded($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateInsightTypeConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $expectedResponse = new InsightTypeConfig(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $insightTypeConfig = new InsightTypeConfig(); + $request = (new UpdateInsightTypeConfigRequest()) + ->setInsightTypeConfig($insightTypeConfig); + $response = $gapicClient->updateInsightTypeConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/UpdateInsightTypeConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getInsightTypeConfig(); + $this->assertProtobufEquals($insightTypeConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateInsightTypeConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $insightTypeConfig = new InsightTypeConfig(); + $request = (new UpdateInsightTypeConfigRequest()) + ->setInsightTypeConfig($insightTypeConfig); + try { + $gapicClient->updateInsightTypeConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRecommenderConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $revisionId = 'revisionId513861631'; + $displayName = 'displayName1615086568'; + $expectedResponse = new RecommenderConfig(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $recommenderConfig = new RecommenderConfig(); + $request = (new UpdateRecommenderConfigRequest()) + ->setRecommenderConfig($recommenderConfig); + $response = $gapicClient->updateRecommenderConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/UpdateRecommenderConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getRecommenderConfig(); + $this->assertProtobufEquals($recommenderConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateRecommenderConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $recommenderConfig = new RecommenderConfig(); + $request = (new UpdateRecommenderConfigRequest()) + ->setRecommenderConfig($recommenderConfig); + try { + $gapicClient->updateRecommenderConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInsightAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $insightSubtype = 'insightSubtype-1491142701'; + $etag = 'etag3123477'; + $expectedResponse = new Insight(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setInsightSubtype($insightSubtype); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); + $request = (new GetInsightRequest()) + ->setName($formattedName); + $response = $gapicClient->getInsightAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsight', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 20242b63458d0c8fced02a603b8e2b841b351042 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 28 May 2026 23:13:04 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- Recommender/metadata/V1/Insight.php | 3 +- Recommender/metadata/V1/InsightTypeConfig.php | 2 +- Recommender/metadata/V1/Recommendation.php | 3 +- Recommender/metadata/V1/RecommenderConfig.php | 2 +- Recommender/src/V1/Impact.php | 34 + Recommender/src/V1/Insight.php | 14 +- Recommender/src/V1/InsightTypeConfig.php | 14 +- Recommender/src/V1/Recommendation.php | 48 +- Recommender/src/V1/RecommenderConfig.php | 14 +- .../Google/Cloud/Recommender/V1/Insight.php | 29 - .../Recommender/V1/InsightTypeConfig.php | 28 - .../Cloud/Recommender/V1/Recommendation.php | 30 - .../Recommender/V1/RecommenderConfig.php | 28 - .../Recommender/V1/RecommenderService.php | 33 - .../Cloud/Recommender/V1/CostProjection.php | 181 --- .../Recommender/V1/GetInsightRequest.php | 81 -- .../V1/GetInsightTypeConfigRequest.php | 111 -- .../V1/GetRecommendationRequest.php | 81 -- .../V1/GetRecommenderConfigRequest.php | 111 -- .../Google/Cloud/Recommender/V1/Impact.php | 242 ---- .../Cloud/Recommender/V1/Impact/Category.php | 89 -- .../Google/Cloud/Recommender/V1/Insight.php | 502 ------- .../Cloud/Recommender/V1/Insight/Category.php | 89 -- .../V1/Insight/RecommendationReference.php | 71 - .../Cloud/Recommender/V1/Insight/Severity.php | 75 - .../Cloud/Recommender/V1/InsightStateInfo.php | 101 -- .../Recommender/V1/InsightStateInfo/State.php | 74 - .../Recommender/V1/InsightTypeConfig.php | 347 ----- .../V1/InsightTypeGenerationConfig.php | 83 -- .../Recommender/V1/ListInsightsRequest.php | 319 ----- .../Recommender/V1/ListInsightsResponse.php | 105 -- .../V1/ListRecommendationsRequest.php | 378 ----- .../V1/ListRecommendationsResponse.php | 105 -- .../V1/MarkInsightAcceptedRequest.php | 158 --- .../V1/MarkRecommendationClaimedRequest.php | 168 --- .../V1/MarkRecommendationDismissedRequest.php | 101 -- .../V1/MarkRecommendationFailedRequest.php | 168 --- .../V1/MarkRecommendationSucceededRequest.php | 168 --- .../Google/Cloud/Recommender/V1/Operation.php | 564 -------- .../Cloud/Recommender/V1/OperationGroup.php | 71 - .../Cloud/Recommender/V1/Recommendation.php | 580 -------- .../V1/Recommendation/InsightReference.php | 71 - .../V1/Recommendation/Priority.php | 75 - .../Recommender/V1/RecommendationContent.php | 119 -- .../V1/RecommendationStateInfo.php | 101 -- .../V1/RecommendationStateInfo/State.php | 92 -- .../Recommender/V1/RecommenderConfig.php | 347 ----- .../V1/RecommenderGenerationConfig.php | 83 -- .../Recommender/V1/ReliabilityProjection.php | 111 -- .../V1/ReliabilityProjection/RiskType.php | 69 - .../Recommender/V1/SecurityProjection.php | 77 -- .../V1/SustainabilityProjection.php | 116 -- .../V1/UpdateInsightTypeConfigRequest.php | 174 --- .../V1/UpdateRecommenderConfigRequest.php | 174 --- .../Cloud/Recommender/V1/ValueMatcher.php | 81 -- .../V1/RecommenderClient/get_insight.php | 77 -- .../get_insight_type_config.php | 86 -- .../RecommenderClient/get_recommendation.php | 77 -- .../get_recommender_config.php | 86 -- .../V1/RecommenderClient/list_insights.php | 93 -- .../list_recommendations.php | 93 -- .../mark_insight_accepted.php | 84 -- .../mark_recommendation_claimed.php | 88 -- .../mark_recommendation_dismissed.php | 84 -- .../mark_recommendation_failed.php | 89 -- .../mark_recommendation_succeeded.php | 89 -- .../update_insight_type_config.php | 60 - .../update_recommender_config.php | 60 - .../v1/src/V1/Client/RecommenderClient.php | 1211 ----------------- .../Recommender/v1/src/V1/gapic_metadata.json | 83 -- .../resources/recommender_client_config.json | 110 -- .../recommender_descriptor_config.php | 232 ---- .../recommender_rest_client_config.php | 366 ----- .../Unit/V1/Client/RecommenderClientTest.php | 1062 --------------- 74 files changed, 102 insertions(+), 11123 deletions(-) delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php delete mode 100644 owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php delete mode 100644 owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php delete mode 100644 owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php delete mode 100644 owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json delete mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php delete mode 100644 owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php delete mode 100644 owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php diff --git a/Recommender/metadata/V1/Insight.php b/Recommender/metadata/V1/Insight.php index 1f15aaf10b94..ac87631fe455 100644 --- a/Recommender/metadata/V1/Insight.php +++ b/Recommender/metadata/V1/Insight.php @@ -14,12 +14,13 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Protobuf\Duration::initOnce(); \GPBMetadata\Google\Protobuf\Struct::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xB3\x11\x0A)google/cloud/recommender/v1/insight.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDC\x09\x0A\x07Insight\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x09 \x03(\x09\x12\x17\x0A\x0Finsight_subtype\x18\x0A \x01(\x09\x12(\x0A\x07content\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x12observation_period\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x0Astate_info\x18\x06 \x01(\x0B2-.google.cloud.recommender.v1.InsightStateInfo\x12?\x0A\x08category\x18\x07 \x01(\x0E2-.google.cloud.recommender.v1.Insight.Category\x12?\x0A\x08severity\x18\x0F \x01(\x0E2-.google.cloud.recommender.v1.Insight.Severity\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12`\x0A\x1Aassociated_recommendations\x18\x08 \x03(\x0B2<.google.cloud.recommender.v1.Insight.RecommendationReference\x1A1\x0A\x17RecommendationReference\x12\x16\x0A\x0Erecommendation\x18\x01 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06\"Q\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x07\x0A\x03LOW\x10\x01\x12\x0A\x0A\x06MEDIUM\x10\x02\x12\x08\x0A\x04HIGH\x10\x03\x12\x0C\x0A\x08CRITICAL\x10\x04:\x9F\x03\xEAA\x9B\x03\x0A\"recommender.googleapis.com/Insight\x12Vprojects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12ebillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12Tfolders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12`organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\"\xAF\x02\x0A\x10InsightStateInfo\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.recommender.v1.InsightStateInfo.State\x12X\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2@.google.cloud.recommender.v1.InsightStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08ACCEPTED\x10\x02\x12\x0D\x0A\x09DISMISSED\x10\x03B\xF0\x03\x0A\x1Fcom.google.cloud.recommender.v1B\x0CInsightProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xD3\x02\x0A&recommender.googleapis.com/InsightType\x12Cprojects/{project}/locations/{location}/insightTypes/{insight_type}\x12RbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}\x12Afolders/{folder}/locations/{location}/insightTypes/{insight_type}\x12Morganizations/{organization}/locations/{location}/insightTypes/{insight_type}b\x06proto3" + "\x0A\xD3\x11\x0A)google/cloud/recommender/v1/insight.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE1\x09\x0A\x07Insight\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x09 \x03(\x09\x12\x17\x0A\x0Finsight_subtype\x18\x0A \x01(\x09\x12(\x0A\x07content\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x12observation_period\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x0Astate_info\x18\x06 \x01(\x0B2-.google.cloud.recommender.v1.InsightStateInfo\x12?\x0A\x08category\x18\x07 \x01(\x0E2-.google.cloud.recommender.v1.Insight.Category\x12?\x0A\x08severity\x18\x0F \x01(\x0E2-.google.cloud.recommender.v1.Insight.Severity\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12`\x0A\x1Aassociated_recommendations\x18\x08 \x03(\x0B2<.google.cloud.recommender.v1.Insight.RecommendationReference\x1A1\x0A\x17RecommendationReference\x12\x16\x0A\x0Erecommendation\x18\x01 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06\"Q\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x07\x0A\x03LOW\x10\x01\x12\x0A\x0A\x06MEDIUM\x10\x02\x12\x08\x0A\x04HIGH\x10\x03\x12\x0C\x0A\x08CRITICAL\x10\x04:\x9F\x03\xEAA\x9B\x03\x0A\"recommender.googleapis.com/Insight\x12Vprojects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12ebillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12Tfolders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12`organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\"\xAF\x02\x0A\x10InsightStateInfo\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.recommender.v1.InsightStateInfo.State\x12X\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2@.google.cloud.recommender.v1.InsightStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08ACCEPTED\x10\x02\x12\x0D\x0A\x09DISMISSED\x10\x03B\xF0\x03\x0A\x1Fcom.google.cloud.recommender.v1B\x0CInsightProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xD3\x02\x0A&recommender.googleapis.com/InsightType\x12Cprojects/{project}/locations/{location}/insightTypes/{insight_type}\x12RbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}\x12Afolders/{folder}/locations/{location}/insightTypes/{insight_type}\x12Morganizations/{organization}/locations/{location}/insightTypes/{insight_type}b\x06proto3" , true); static::$is_initialized = true; diff --git a/Recommender/metadata/V1/InsightTypeConfig.php b/Recommender/metadata/V1/InsightTypeConfig.php index ea7a8689fbdb..4e0a74c77d3d 100644 --- a/Recommender/metadata/V1/InsightTypeConfig.php +++ b/Recommender/metadata/V1/InsightTypeConfig.php @@ -19,7 +19,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xD8\x08\x0A5google/cloud/recommender/v1/insight_type_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB1\x05\x0A\x11InsightTypeConfig\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12`\x0A\x1Einsight_type_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.InsightTypeGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.InsightTypeConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAF\x02\xEAA\xAB\x02\x0A,recommender.googleapis.com/InsightTypeConfig\x12Jprojects/{project}/locations/{location}/insightTypes/{insight_type}/config\x12Torganizations/{organization}/locations/{location}/insightTypes/{insight_type}/config\x12YbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config\"F\x0A\x1BInsightTypeGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16InsightTypeConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" + "\x0A\xDD\x08\x0A5google/cloud/recommender/v1/insight_type_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB6\x05\x0A\x11InsightTypeConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12`\x0A\x1Einsight_type_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.InsightTypeGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.InsightTypeConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAF\x02\xEAA\xAB\x02\x0A,recommender.googleapis.com/InsightTypeConfig\x12Jprojects/{project}/locations/{location}/insightTypes/{insight_type}/config\x12Torganizations/{organization}/locations/{location}/insightTypes/{insight_type}/config\x12YbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config\"F\x0A\x1BInsightTypeGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16InsightTypeConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/Recommender/metadata/V1/Recommendation.php b/Recommender/metadata/V1/Recommendation.php index 44c2837a657e..2815d94b3534 100644 --- a/Recommender/metadata/V1/Recommendation.php +++ b/Recommender/metadata/V1/Recommendation.php @@ -14,13 +14,14 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Protobuf\Duration::initOnce(); \GPBMetadata\Google\Protobuf\Struct::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); \GPBMetadata\Google\Type\Money::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xF1 \x0A0google/cloud/recommender/v1/recommendation.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xA2\x09\x0A\x0ERecommendation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x1B\x0A\x13recommender_subtype\x18\x0C \x01(\x09\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12;\x0A\x0Eprimary_impact\x18\x05 \x01(\x0B2#.google.cloud.recommender.v1.Impact\x12>\x0A\x11additional_impact\x18\x06 \x03(\x0B2#.google.cloud.recommender.v1.Impact\x12F\x0A\x08priority\x18\x11 \x01(\x0E24.google.cloud.recommender.v1.Recommendation.Priority\x12C\x0A\x07content\x18\x07 \x01(\x0B22.google.cloud.recommender.v1.RecommendationContent\x12H\x0A\x0Astate_info\x18\x0A \x01(\x0B24.google.cloud.recommender.v1.RecommendationStateInfo\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12Y\x0A\x13associated_insights\x18\x0E \x03(\x0B2<.google.cloud.recommender.v1.Recommendation.InsightReference\x12\x14\x0A\x0Cxor_group_id\x18\x12 \x01(\x09\x1A#\x0A\x10InsightReference\x12\x0F\x0A\x07insight\x18\x01 \x01(\x09\"D\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P4\x10\x01\x12\x06\x0A\x02P3\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P1\x10\x04:\xDA\x03\xEAA\xD6\x03\x0A)recommender.googleapis.com/Recommendation\x12cprojects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12rbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12afolders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12morganizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\"\x89\x01\x0A\x15RecommendationContent\x12E\x0A\x10operation_groups\x18\x02 \x03(\x0B2+.google.cloud.recommender.v1.OperationGroup\x12)\x0A\x08overview\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\"L\x0A\x0EOperationGroup\x12:\x0A\x0Aoperations\x18\x01 \x03(\x0B2&.google.cloud.recommender.v1.Operation\"\xD7\x04\x0A\x09Operation\x12\x0E\x0A\x06action\x18\x01 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x03 \x01(\x09\x12\x0C\x0A\x04path\x18\x04 \x01(\x09\x12\x17\x0A\x0Fsource_resource\x18\x05 \x01(\x09\x12\x13\x0A\x0Bsource_path\x18\x06 \x01(\x09\x12'\x0A\x05value\x18\x07 \x01(\x0B2\x16.google.protobuf.ValueH\x00\x12B\x0A\x0Dvalue_matcher\x18\x0A \x01(\x0B2).google.cloud.recommender.v1.ValueMatcherH\x00\x12M\x0A\x0Cpath_filters\x18\x08 \x03(\x0B27.google.cloud.recommender.v1.Operation.PathFiltersEntry\x12Z\x0A\x13path_value_matchers\x18\x0B \x03(\x0B2=.google.cloud.recommender.v1.Operation.PathValueMatchersEntry\x1AJ\x0A\x10PathFiltersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12%\x0A\x05value\x18\x02 \x01(\x0B2\x16.google.protobuf.Value:\x028\x01\x1Ac\x0A\x16PathValueMatchersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.recommender.v1.ValueMatcher:\x028\x01B\x0C\x0A\x0Apath_value\":\x0A\x0CValueMatcher\x12\x19\x0A\x0Fmatches_pattern\x18\x01 \x01(\x09H\x00B\x0F\x0A\x0Dmatch_variant\"\x93\x01\x0A\x0ECostProjection\x12 \x0A\x04cost\x18\x01 \x01(\x0B2\x12.google.type.Money\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x122\x0A\x16cost_in_local_currency\x18\x03 \x01(\x0B2\x12.google.type.Money\">\x0A\x12SecurityProjection\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"Y\x0A\x18SustainabilityProjection\x12\x10\x0A\x08kg_c_o2e\x18\x01 \x01(\x01\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xEC\x01\x0A\x15ReliabilityProjection\x12J\x0A\x05risks\x18\x01 \x03(\x0E2;.google.cloud.recommender.v1.ReliabilityProjection.RiskType\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"]\x0A\x08RiskType\x12\x19\x0A\x15RISK_TYPE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12SERVICE_DISRUPTION\x10\x01\x12\x0D\x0A\x09DATA_LOSS\x10\x02\x12\x0F\x0A\x0BACCESS_DENY\x10\x03\"\xA8\x04\x0A\x06Impact\x12>\x0A\x08category\x18\x01 \x01(\x0E2,.google.cloud.recommender.v1.Impact.Category\x12F\x0A\x0Fcost_projection\x18d \x01(\x0B2+.google.cloud.recommender.v1.CostProjectionH\x00\x12N\x0A\x13security_projection\x18e \x01(\x0B2/.google.cloud.recommender.v1.SecurityProjectionH\x00\x12Z\x0A\x19sustainability_projection\x18f \x01(\x0B25.google.cloud.recommender.v1.SustainabilityProjectionH\x00\x12T\x0A\x16reliability_projection\x18g \x01(\x0B22.google.cloud.recommender.v1.ReliabilityProjectionH\x00\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06B\x0C\x0A\x0Aprojection\"\xDE\x02\x0A\x17RecommendationStateInfo\x12I\x0A\x05state\x18\x01 \x01(\x0E2:.google.cloud.recommender.v1.RecommendationStateInfo.State\x12_\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2G.google.cloud.recommender.v1.RecommendationStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0B\x0A\x07CLAIMED\x10\x06\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09DISMISSED\x10\x05B\xDE\x03\x0A\x1Fcom.google.cloud.recommender.v1P\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xCF\x02\x0A&recommender.googleapis.com/Recommender\x12Bprojects/{project}/locations/{location}/recommenders/{recommender}\x12QbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}\x12@folders/{folder}/locations/{location}/recommenders/{recommender}\x12Lorganizations/{organization}/locations/{location}/recommenders/{recommender}b\x06proto3" + "\x0A\xBC!\x0A0google/cloud/recommender/v1/recommendation.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xC1\x09\x0A\x0ERecommendation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x1B\x0A\x13recommender_subtype\x18\x0C \x01(\x09\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12;\x0A\x0Eprimary_impact\x18\x05 \x01(\x0B2#.google.cloud.recommender.v1.Impact\x12>\x0A\x11additional_impact\x18\x06 \x03(\x0B2#.google.cloud.recommender.v1.Impact\x12F\x0A\x08priority\x18\x11 \x01(\x0E24.google.cloud.recommender.v1.Recommendation.Priority\x12C\x0A\x07content\x18\x07 \x01(\x0B22.google.cloud.recommender.v1.RecommendationContent\x12H\x0A\x0Astate_info\x18\x0A \x01(\x0B24.google.cloud.recommender.v1.RecommendationStateInfo\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12Y\x0A\x13associated_insights\x18\x0E \x03(\x0B2<.google.cloud.recommender.v1.Recommendation.InsightReference\x12\x14\x0A\x0Cxor_group_id\x18\x12 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x13 \x03(\x09\x1A#\x0A\x10InsightReference\x12\x0F\x0A\x07insight\x18\x01 \x01(\x09\"D\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P4\x10\x01\x12\x06\x0A\x02P3\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P1\x10\x04:\xDA\x03\xEAA\xD6\x03\x0A)recommender.googleapis.com/Recommendation\x12cprojects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12rbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12afolders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12morganizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\"\x89\x01\x0A\x15RecommendationContent\x12E\x0A\x10operation_groups\x18\x02 \x03(\x0B2+.google.cloud.recommender.v1.OperationGroup\x12)\x0A\x08overview\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\"L\x0A\x0EOperationGroup\x12:\x0A\x0Aoperations\x18\x01 \x03(\x0B2&.google.cloud.recommender.v1.Operation\"\xD7\x04\x0A\x09Operation\x12\x0E\x0A\x06action\x18\x01 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x03 \x01(\x09\x12\x0C\x0A\x04path\x18\x04 \x01(\x09\x12\x17\x0A\x0Fsource_resource\x18\x05 \x01(\x09\x12\x13\x0A\x0Bsource_path\x18\x06 \x01(\x09\x12'\x0A\x05value\x18\x07 \x01(\x0B2\x16.google.protobuf.ValueH\x00\x12B\x0A\x0Dvalue_matcher\x18\x0A \x01(\x0B2).google.cloud.recommender.v1.ValueMatcherH\x00\x12M\x0A\x0Cpath_filters\x18\x08 \x03(\x0B27.google.cloud.recommender.v1.Operation.PathFiltersEntry\x12Z\x0A\x13path_value_matchers\x18\x0B \x03(\x0B2=.google.cloud.recommender.v1.Operation.PathValueMatchersEntry\x1AJ\x0A\x10PathFiltersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12%\x0A\x05value\x18\x02 \x01(\x0B2\x16.google.protobuf.Value:\x028\x01\x1Ac\x0A\x16PathValueMatchersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.recommender.v1.ValueMatcher:\x028\x01B\x0C\x0A\x0Apath_value\":\x0A\x0CValueMatcher\x12\x19\x0A\x0Fmatches_pattern\x18\x01 \x01(\x09H\x00B\x0F\x0A\x0Dmatch_variant\"\x93\x01\x0A\x0ECostProjection\x12 \x0A\x04cost\x18\x01 \x01(\x0B2\x12.google.type.Money\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x122\x0A\x16cost_in_local_currency\x18\x03 \x01(\x0B2\x12.google.type.Money\">\x0A\x12SecurityProjection\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"Y\x0A\x18SustainabilityProjection\x12\x10\x0A\x08kg_c_o2e\x18\x01 \x01(\x01\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xEC\x01\x0A\x15ReliabilityProjection\x12J\x0A\x05risks\x18\x01 \x03(\x0E2;.google.cloud.recommender.v1.ReliabilityProjection.RiskType\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"]\x0A\x08RiskType\x12\x19\x0A\x15RISK_TYPE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12SERVICE_DISRUPTION\x10\x01\x12\x0D\x0A\x09DATA_LOSS\x10\x02\x12\x0F\x0A\x0BACCESS_DENY\x10\x03\"\xB9\x04\x0A\x06Impact\x12>\x0A\x08category\x18\x01 \x01(\x0E2,.google.cloud.recommender.v1.Impact.Category\x12F\x0A\x0Fcost_projection\x18d \x01(\x0B2+.google.cloud.recommender.v1.CostProjectionH\x00\x12N\x0A\x13security_projection\x18e \x01(\x0B2/.google.cloud.recommender.v1.SecurityProjectionH\x00\x12Z\x0A\x19sustainability_projection\x18f \x01(\x0B25.google.cloud.recommender.v1.SustainabilityProjectionH\x00\x12T\x0A\x16reliability_projection\x18g \x01(\x0B22.google.cloud.recommender.v1.ReliabilityProjectionH\x00\x12\x0F\x0A\x07service\x18\x03 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06B\x0C\x0A\x0Aprojection\"\xDE\x02\x0A\x17RecommendationStateInfo\x12I\x0A\x05state\x18\x01 \x01(\x0E2:.google.cloud.recommender.v1.RecommendationStateInfo.State\x12_\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2G.google.cloud.recommender.v1.RecommendationStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0B\x0A\x07CLAIMED\x10\x06\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09DISMISSED\x10\x05B\xDE\x03\x0A\x1Fcom.google.cloud.recommender.v1P\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xCF\x02\x0A&recommender.googleapis.com/Recommender\x12Bprojects/{project}/locations/{location}/recommenders/{recommender}\x12QbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}\x12@folders/{folder}/locations/{location}/recommenders/{recommender}\x12Lorganizations/{organization}/locations/{location}/recommenders/{recommender}b\x06proto3" , true); static::$is_initialized = true; diff --git a/Recommender/metadata/V1/RecommenderConfig.php b/Recommender/metadata/V1/RecommenderConfig.php index b18572d99d06..0e760422b7b9 100644 --- a/Recommender/metadata/V1/RecommenderConfig.php +++ b/Recommender/metadata/V1/RecommenderConfig.php @@ -19,7 +19,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xD3\x08\x0A4google/cloud/recommender/v1/recommender_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAD\x05\x0A\x11RecommenderConfig\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12_\x0A\x1Drecommender_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.RecommenderGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.RecommenderConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAC\x02\xEAA\xA8\x02\x0A,recommender.googleapis.com/RecommenderConfig\x12Iprojects/{project}/locations/{location}/recommenders/{recommender}/config\x12Sorganizations/{organization}/locations/{location}/recommenders/{recommender}/config\x12XbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config\"F\x0A\x1BRecommenderGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16RecommenderConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" + "\x0A\xD8\x08\x0A4google/cloud/recommender/v1/recommender_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB2\x05\x0A\x11RecommenderConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12_\x0A\x1Drecommender_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.RecommenderGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.RecommenderConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAC\x02\xEAA\xA8\x02\x0A,recommender.googleapis.com/RecommenderConfig\x12Iprojects/{project}/locations/{location}/recommenders/{recommender}/config\x12Sorganizations/{organization}/locations/{location}/recommenders/{recommender}/config\x12XbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config\"F\x0A\x1BRecommenderGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16RecommenderConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/Recommender/src/V1/Impact.php b/Recommender/src/V1/Impact.php index 6ae9c9914d13..064a98d2a047 100644 --- a/Recommender/src/V1/Impact.php +++ b/Recommender/src/V1/Impact.php @@ -21,6 +21,12 @@ class Impact extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; */ protected $category = 0; + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + */ + protected $service = ''; protected $projection; /** @@ -39,6 +45,8 @@ class Impact extends \Google\Protobuf\Internal\Message * Use with CategoryType.SUSTAINABILITY * @type \Google\Cloud\Recommender\V1\ReliabilityProjection $reliability_projection * Use with CategoryType.RELIABILITY + * @type string $service + * The service that this impact is associated with. * } */ public function __construct($data = NULL) { @@ -196,6 +204,32 @@ public function setReliabilityProjection($var) return $this; } + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * The service that this impact is associated with. + * + * Generated from protobuf field string service = 3; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + /** * @return string */ diff --git a/Recommender/src/V1/Insight.php b/Recommender/src/V1/Insight.php index 777930744420..106f5c30272d 100644 --- a/Recommender/src/V1/Insight.php +++ b/Recommender/src/V1/Insight.php @@ -17,9 +17,9 @@ class Insight extends \Google\Protobuf\Internal\Message { /** - * Name of the insight. + * Identifier. Name of the insight. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -101,7 +101,7 @@ class Insight extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Name of the insight. + * Identifier. Name of the insight. * @type string $description * Free-form human readable summary in English. The maximum length is 500 * characters. @@ -137,9 +137,9 @@ public function __construct($data = NULL) { } /** - * Name of the insight. + * Identifier. Name of the insight. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -148,9 +148,9 @@ public function getName() } /** - * Name of the insight. + * Identifier. Name of the insight. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/Recommender/src/V1/InsightTypeConfig.php b/Recommender/src/V1/InsightTypeConfig.php index 0cd044e691fa..8b5e9258437d 100644 --- a/Recommender/src/V1/InsightTypeConfig.php +++ b/Recommender/src/V1/InsightTypeConfig.php @@ -16,11 +16,11 @@ class InsightTypeConfig extends \Google\Protobuf\Internal\Message { /** - * Name of insight type config. + * Identifier. Name of insight type config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -79,7 +79,7 @@ class InsightTypeConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Name of insight type config. + * Identifier. Name of insight type config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config * @type \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig $insight_type_generation_config @@ -114,11 +114,11 @@ public function __construct($data = NULL) { } /** - * Name of insight type config. + * Identifier. Name of insight type config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -127,11 +127,11 @@ public function getName() } /** - * Name of insight type config. + * Identifier. Name of insight type config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/Recommender/src/V1/Recommendation.php b/Recommender/src/V1/Recommendation.php index 67f53868e80d..dffee7b09da0 100644 --- a/Recommender/src/V1/Recommendation.php +++ b/Recommender/src/V1/Recommendation.php @@ -17,9 +17,9 @@ class Recommendation extends \Google\Protobuf\Internal\Message { /** - * Name of recommendation. + * Identifier. Name of recommendation. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -104,6 +104,12 @@ class Recommendation extends \Google\Protobuf\Internal\Message * Generated from protobuf field string xor_group_id = 18; */ protected $xor_group_id = ''; + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + */ + private $target_resources; /** * Constructor. @@ -112,7 +118,7 @@ class Recommendation extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Name of recommendation. + * Identifier. Name of recommendation. * @type string $description * Free-form human readable summary in English. The maximum length is 500 * characters. @@ -151,6 +157,8 @@ class Recommendation extends \Google\Protobuf\Internal\Message * 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. + * @type string[] $target_resources + * Fully qualified resource names that this recommendation is targeting. * } */ public function __construct($data = NULL) { @@ -159,9 +167,9 @@ public function __construct($data = NULL) { } /** - * Name of recommendation. + * Identifier. Name of recommendation. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -170,9 +178,9 @@ public function getName() } /** - * Name of recommendation. + * Identifier. Name of recommendation. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -542,5 +550,31 @@ public function setXorGroupId($var) return $this; } + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + * @return RepeatedField + */ + public function getTargetResources() + { + return $this->target_resources; + } + + /** + * Fully qualified resource names that this recommendation is targeting. + * + * Generated from protobuf field repeated string target_resources = 19; + * @param string[] $var + * @return $this + */ + public function setTargetResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_resources = $arr; + + return $this; + } + } diff --git a/Recommender/src/V1/RecommenderConfig.php b/Recommender/src/V1/RecommenderConfig.php index a470a59e5396..b000d1dda93c 100644 --- a/Recommender/src/V1/RecommenderConfig.php +++ b/Recommender/src/V1/RecommenderConfig.php @@ -16,11 +16,11 @@ class RecommenderConfig extends \Google\Protobuf\Internal\Message { /** - * Name of recommender config. + * Identifier. Name of recommender config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -79,7 +79,7 @@ class RecommenderConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Name of recommender config. + * Identifier. Name of recommender config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config * @type \Google\Cloud\Recommender\V1\RecommenderGenerationConfig $recommender_generation_config @@ -114,11 +114,11 @@ public function __construct($data = NULL) { } /** - * Name of recommender config. + * Identifier. Name of recommender config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -127,11 +127,11 @@ public function getName() } /** - * Name of recommender config. + * Identifier. Name of recommender config. * Eg, * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php deleted file mode 100644 index ac87631fe455..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Insight.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD3\x11\x0A)google/cloud/recommender/v1/insight.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE1\x09\x0A\x07Insight\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x09 \x03(\x09\x12\x17\x0A\x0Finsight_subtype\x18\x0A \x01(\x09\x12(\x0A\x07content\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x12observation_period\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12A\x0A\x0Astate_info\x18\x06 \x01(\x0B2-.google.cloud.recommender.v1.InsightStateInfo\x12?\x0A\x08category\x18\x07 \x01(\x0E2-.google.cloud.recommender.v1.Insight.Category\x12?\x0A\x08severity\x18\x0F \x01(\x0E2-.google.cloud.recommender.v1.Insight.Severity\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12`\x0A\x1Aassociated_recommendations\x18\x08 \x03(\x0B2<.google.cloud.recommender.v1.Insight.RecommendationReference\x1A1\x0A\x17RecommendationReference\x12\x16\x0A\x0Erecommendation\x18\x01 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06\"Q\x0A\x08Severity\x12\x18\x0A\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x07\x0A\x03LOW\x10\x01\x12\x0A\x0A\x06MEDIUM\x10\x02\x12\x08\x0A\x04HIGH\x10\x03\x12\x0C\x0A\x08CRITICAL\x10\x04:\x9F\x03\xEAA\x9B\x03\x0A\"recommender.googleapis.com/Insight\x12Vprojects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12ebillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12Tfolders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\x12`organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}\"\xAF\x02\x0A\x10InsightStateInfo\x12B\x0A\x05state\x18\x01 \x01(\x0E23.google.cloud.recommender.v1.InsightStateInfo.State\x12X\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2@.google.cloud.recommender.v1.InsightStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08ACCEPTED\x10\x02\x12\x0D\x0A\x09DISMISSED\x10\x03B\xF0\x03\x0A\x1Fcom.google.cloud.recommender.v1B\x0CInsightProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xD3\x02\x0A&recommender.googleapis.com/InsightType\x12Cprojects/{project}/locations/{location}/insightTypes/{insight_type}\x12RbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}\x12Afolders/{folder}/locations/{location}/insightTypes/{insight_type}\x12Morganizations/{organization}/locations/{location}/insightTypes/{insight_type}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php deleted file mode 100644 index 4e0a74c77d3d..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/InsightTypeConfig.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDD\x08\x0A5google/cloud/recommender/v1/insight_type_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB6\x05\x0A\x11InsightTypeConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12`\x0A\x1Einsight_type_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.InsightTypeGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.InsightTypeConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAF\x02\xEAA\xAB\x02\x0A,recommender.googleapis.com/InsightTypeConfig\x12Jprojects/{project}/locations/{location}/insightTypes/{insight_type}/config\x12Torganizations/{organization}/locations/{location}/insightTypes/{insight_type}/config\x12YbillingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config\"F\x0A\x1BInsightTypeGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16InsightTypeConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php deleted file mode 100644 index 2815d94b3534..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/Recommendation.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBC!\x0A0google/cloud/recommender/v1/recommendation.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xC1\x09\x0A\x0ERecommendation\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x12\x1B\x0A\x13recommender_subtype\x18\x0C \x01(\x09\x125\x0A\x11last_refresh_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12;\x0A\x0Eprimary_impact\x18\x05 \x01(\x0B2#.google.cloud.recommender.v1.Impact\x12>\x0A\x11additional_impact\x18\x06 \x03(\x0B2#.google.cloud.recommender.v1.Impact\x12F\x0A\x08priority\x18\x11 \x01(\x0E24.google.cloud.recommender.v1.Recommendation.Priority\x12C\x0A\x07content\x18\x07 \x01(\x0B22.google.cloud.recommender.v1.RecommendationContent\x12H\x0A\x0Astate_info\x18\x0A \x01(\x0B24.google.cloud.recommender.v1.RecommendationStateInfo\x12\x0C\x0A\x04etag\x18\x0B \x01(\x09\x12Y\x0A\x13associated_insights\x18\x0E \x03(\x0B2<.google.cloud.recommender.v1.Recommendation.InsightReference\x12\x14\x0A\x0Cxor_group_id\x18\x12 \x01(\x09\x12\x18\x0A\x10target_resources\x18\x13 \x03(\x09\x1A#\x0A\x10InsightReference\x12\x0F\x0A\x07insight\x18\x01 \x01(\x09\"D\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P4\x10\x01\x12\x06\x0A\x02P3\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P1\x10\x04:\xDA\x03\xEAA\xD6\x03\x0A)recommender.googleapis.com/Recommendation\x12cprojects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12rbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12afolders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\x12morganizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}\"\x89\x01\x0A\x15RecommendationContent\x12E\x0A\x10operation_groups\x18\x02 \x03(\x0B2+.google.cloud.recommender.v1.OperationGroup\x12)\x0A\x08overview\x18\x03 \x01(\x0B2\x17.google.protobuf.Struct\"L\x0A\x0EOperationGroup\x12:\x0A\x0Aoperations\x18\x01 \x03(\x0B2&.google.cloud.recommender.v1.Operation\"\xD7\x04\x0A\x09Operation\x12\x0E\x0A\x06action\x18\x01 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x02 \x01(\x09\x12\x10\x0A\x08resource\x18\x03 \x01(\x09\x12\x0C\x0A\x04path\x18\x04 \x01(\x09\x12\x17\x0A\x0Fsource_resource\x18\x05 \x01(\x09\x12\x13\x0A\x0Bsource_path\x18\x06 \x01(\x09\x12'\x0A\x05value\x18\x07 \x01(\x0B2\x16.google.protobuf.ValueH\x00\x12B\x0A\x0Dvalue_matcher\x18\x0A \x01(\x0B2).google.cloud.recommender.v1.ValueMatcherH\x00\x12M\x0A\x0Cpath_filters\x18\x08 \x03(\x0B27.google.cloud.recommender.v1.Operation.PathFiltersEntry\x12Z\x0A\x13path_value_matchers\x18\x0B \x03(\x0B2=.google.cloud.recommender.v1.Operation.PathValueMatchersEntry\x1AJ\x0A\x10PathFiltersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12%\x0A\x05value\x18\x02 \x01(\x0B2\x16.google.protobuf.Value:\x028\x01\x1Ac\x0A\x16PathValueMatchersEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.recommender.v1.ValueMatcher:\x028\x01B\x0C\x0A\x0Apath_value\":\x0A\x0CValueMatcher\x12\x19\x0A\x0Fmatches_pattern\x18\x01 \x01(\x09H\x00B\x0F\x0A\x0Dmatch_variant\"\x93\x01\x0A\x0ECostProjection\x12 \x0A\x04cost\x18\x01 \x01(\x0B2\x12.google.type.Money\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x122\x0A\x16cost_in_local_currency\x18\x03 \x01(\x0B2\x12.google.type.Money\">\x0A\x12SecurityProjection\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"Y\x0A\x18SustainabilityProjection\x12\x10\x0A\x08kg_c_o2e\x18\x01 \x01(\x01\x12+\x0A\x08duration\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xEC\x01\x0A\x15ReliabilityProjection\x12J\x0A\x05risks\x18\x01 \x03(\x0E2;.google.cloud.recommender.v1.ReliabilityProjection.RiskType\x12(\x0A\x07details\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"]\x0A\x08RiskType\x12\x19\x0A\x15RISK_TYPE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12SERVICE_DISRUPTION\x10\x01\x12\x0D\x0A\x09DATA_LOSS\x10\x02\x12\x0F\x0A\x0BACCESS_DENY\x10\x03\"\xB9\x04\x0A\x06Impact\x12>\x0A\x08category\x18\x01 \x01(\x0E2,.google.cloud.recommender.v1.Impact.Category\x12F\x0A\x0Fcost_projection\x18d \x01(\x0B2+.google.cloud.recommender.v1.CostProjectionH\x00\x12N\x0A\x13security_projection\x18e \x01(\x0B2/.google.cloud.recommender.v1.SecurityProjectionH\x00\x12Z\x0A\x19sustainability_projection\x18f \x01(\x0B25.google.cloud.recommender.v1.SustainabilityProjectionH\x00\x12T\x0A\x16reliability_projection\x18g \x01(\x0B22.google.cloud.recommender.v1.ReliabilityProjectionH\x00\x12\x0F\x0A\x07service\x18\x03 \x01(\x09\"\x85\x01\x0A\x08Category\x12\x18\x0A\x14CATEGORY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04COST\x10\x01\x12\x0C\x0A\x08SECURITY\x10\x02\x12\x0F\x0A\x0BPERFORMANCE\x10\x03\x12\x11\x0A\x0DMANAGEABILITY\x10\x04\x12\x12\x0A\x0ESUSTAINABILITY\x10\x05\x12\x0F\x0A\x0BRELIABILITY\x10\x06B\x0C\x0A\x0Aprojection\"\xDE\x02\x0A\x17RecommendationStateInfo\x12I\x0A\x05state\x18\x01 \x01(\x0E2:.google.cloud.recommender.v1.RecommendationStateInfo.State\x12_\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2G.google.cloud.recommender.v1.RecommendationStateInfo.StateMetadataEntry\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0B\x0A\x07CLAIMED\x10\x06\x12\x0D\x0A\x09SUCCEEDED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0D\x0A\x09DISMISSED\x10\x05B\xDE\x03\x0A\x1Fcom.google.cloud.recommender.v1P\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1\xEAA\xCF\x02\x0A&recommender.googleapis.com/Recommender\x12Bprojects/{project}/locations/{location}/recommenders/{recommender}\x12QbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}\x12@folders/{folder}/locations/{location}/recommenders/{recommender}\x12Lorganizations/{organization}/locations/{location}/recommenders/{recommender}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php deleted file mode 100644 index 0e760422b7b9..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderConfig.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD8\x08\x0A4google/cloud/recommender/v1/recommender_config.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB2\x05\x0A\x11RecommenderConfig\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12_\x0A\x1Drecommender_generation_config\x18\x02 \x01(\x0B28.google.cloud.recommender.v1.RecommenderGenerationConfig\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Brevision_id\x18\x05 \x01(\x09B\x06\xE0A\x05\xE0A\x03\x12T\x0A\x0Bannotations\x18\x06 \x03(\x0B2?.google.cloud.recommender.v1.RecommenderConfig.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x07 \x01(\x09\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xAC\x02\xEAA\xA8\x02\x0A,recommender.googleapis.com/RecommenderConfig\x12Iprojects/{project}/locations/{location}/recommenders/{recommender}/config\x12Sorganizations/{organization}/locations/{location}/recommenders/{recommender}/config\x12XbillingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config\"F\x0A\x1BRecommenderGenerationConfig\x12'\x0A\x06params\x18\x01 \x01(\x0B2\x17.google.protobuf.StructB\xA3\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x16RecommenderConfigProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php b/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php deleted file mode 100644 index 56841d8852c2..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/GPBMetadata/Google/Cloud/Recommender/V1/RecommenderService.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF3F\x0A5google/cloud/recommender/v1/recommender_service.proto\x12\x1Bgoogle.cloud.recommender.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/recommender/v1/insight.proto\x1A5google/cloud/recommender/v1/insight_type_config.proto\x1A0google/cloud/recommender/v1/recommendation.proto\x1A4google/cloud/recommender/v1/recommender_config.proto\x1A google/protobuf/field_mask.proto\"\x9B\x01\x0A\x13ListInsightsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&recommender.googleapis.com/InsightType\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"g\x0A\x14ListInsightsResponse\x126\x0A\x08insights\x18\x01 \x03(\x0B2\$.google.cloud.recommender.v1.Insight\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"M\x0A\x11GetInsightRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"recommender.googleapis.com/Insight\"\x88\x02\x0A\x1AMarkInsightAcceptedRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"recommender.googleapis.com/Insight\x12g\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2J.google.cloud.recommender.v1.MarkInsightAcceptedRequest.StateMetadataEntryB\x03\xE0A\x01\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x9D\x01\x0A\x1AListRecommendationsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&recommender.googleapis.com/Recommender\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"|\x0A\x1BListRecommendationsResponse\x12D\x0A\x0Frecommendations\x18\x01 \x03(\x0B2+.google.cloud.recommender.v1.Recommendation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x18GetRecommendationRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\"s\x0A\"MarkRecommendationDismissedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12\x0C\x0A\x04etag\x18\x02 \x01(\x09\"\x96\x02\x0A MarkRecommendationClaimedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12h\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2P.google.cloud.recommender.v1.MarkRecommendationClaimedRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x9A\x02\x0A\"MarkRecommendationSucceededRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12j\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2R.google.cloud.recommender.v1.MarkRecommendationSucceededRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x94\x02\x0A\x1FMarkRecommendationFailedRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)recommender.googleapis.com/Recommendation\x12g\x0A\x0Estate_metadata\x18\x02 \x03(\x0B2O.google.cloud.recommender.v1.MarkRecommendationFailedRequest.StateMetadataEntry\x12\x11\x0A\x04etag\x18\x03 \x01(\x09B\x03\xE0A\x02\x1A4\x0A\x12StateMetadataEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"a\x0A\x1BGetRecommenderConfigRequest\x12B\x0A\x04name\x18\x01 \x01(\x09B4\xE0A\x02\xFAA.\x0A,recommender.googleapis.com/RecommenderConfig\"\xB9\x01\x0A\x1EUpdateRecommenderConfigRequest\x12O\x0A\x12recommender_config\x18\x01 \x01(\x0B2..google.cloud.recommender.v1.RecommenderConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12\x15\x0A\x0Dvalidate_only\x18\x03 \x01(\x08\"a\x0A\x1BGetInsightTypeConfigRequest\x12B\x0A\x04name\x18\x01 \x01(\x09B4\xE0A\x02\xFAA.\x0A,recommender.googleapis.com/InsightTypeConfig\"\xBA\x01\x0A\x1EUpdateInsightTypeConfigRequest\x12P\x0A\x13insight_type_config\x18\x01 \x01(\x0B2..google.cloud.recommender.v1.InsightTypeConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\x12\x15\x0A\x0Dvalidate_only\x18\x03 \x01(\x082\xD6.\x0A\x0BRecommender\x12\x8B\x03\x0A\x0CListInsights\x120.google.cloud.recommender.v1.ListInsightsRequest\x1A1.google.cloud.recommender.v1.ListInsightsResponse\"\x95\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x85\x02\x12;/v1/{parent=projects/*/locations/*/insightTypes/*}/insightsZD\x12B/v1/{parent=billingAccounts/*/locations/*/insightTypes/*}/insightsZ<\x12:/v1/{parent=folders/*/locations/*/insightTypes/*}/insightsZB\x12@/v1/{parent=organizations/*/locations/*/insightTypes/*}/insights\x12\xF8\x02\x0A\x0AGetInsight\x12..google.cloud.recommender.v1.GetInsightRequest\x1A\$.google.cloud.recommender.v1.Insight\"\x93\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\x85\x02\x12;/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}ZD\x12B/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}Z<\x12:/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}ZB\x12@/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}\x12\xDE\x03\x0A\x13MarkInsightAccepted\x127.google.cloud.recommender.v1.MarkInsightAcceptedRequest\x1A\$.google.cloud.recommender.v1.Insight\"\xE7\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xC5\x02\"H/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZT\"O/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZL\"G/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*ZR\"M/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}:markAccepted:\x01*\x12\xCC\x03\x0A\x13ListRecommendations\x127.google.cloud.recommender.v1.ListRecommendationsRequest\x1A8.google.cloud.recommender.v1.ListRecommendationsResponse\"\xC1\x02\xDAA\x06parent\xDAA\x0Dparent,filter\x82\xD3\xE4\x93\x02\xA1\x02\x12B/v1/{parent=projects/*/locations/*/recommenders/*}/recommendationsZK\x12I/v1/{parent=billingAccounts/*/locations/*/recommenders/*}/recommendationsZC\x12A/v1/{parent=folders/*/locations/*/recommenders/*}/recommendationsZI\x12G/v1/{parent=organizations/*/locations/*/recommenders/*}/recommendations\x12\xA9\x03\x0A\x11GetRecommendation\x125.google.cloud.recommender.v1.GetRecommendationRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xAF\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\xA1\x02\x12B/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}ZK\x12I/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}ZC\x12A/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}ZI\x12G/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}\x12\xFA\x03\x0A\x1BMarkRecommendationDismissed\x12?.google.cloud.recommender.v1.MarkRecommendationDismissedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xEC\x02\x82\xD3\xE4\x93\x02\xE5\x02\"P/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*Z\\\"W/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*ZT\"O/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*ZZ\"U/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markDismissed:\x01*\x12\x89\x04\x0A\x19MarkRecommendationClaimed\x12=.google.cloud.recommender.v1.MarkRecommendationClaimedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xFF\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xDD\x02\"N/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZZ\"U/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZR\"M/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*ZX\"S/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markClaimed:\x01*\x12\x95\x04\x0A\x1BMarkRecommendationSucceeded\x12?.google.cloud.recommender.v1.MarkRecommendationSucceededRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\x87\x03\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xE5\x02\"P/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*Z\\\"W/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*ZT\"O/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*ZZ\"U/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markSucceeded:\x01*\x12\x83\x04\x0A\x18MarkRecommendationFailed\x12<.google.cloud.recommender.v1.MarkRecommendationFailedRequest\x1A+.google.cloud.recommender.v1.Recommendation\"\xFB\x02\xDAA\x18name,state_metadata,etag\x82\xD3\xE4\x93\x02\xD9\x02\"M/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZY\"T/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZQ\"L/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*ZW\"R/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markFailed:\x01*\x12\xCC\x02\x0A\x14GetRecommenderConfig\x128.google.cloud.recommender.v1.GetRecommenderConfigRequest\x1A..google.cloud.recommender.v1.RecommenderConfig\"\xC9\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xBB\x01\x127/v1/{name=projects/*/locations/*/recommenders/*/config}Z>\x12/v1/{name=billingAccounts/*/locations/*/recommenders/*/config}\x12\xE1\x03\x0A\x17UpdateRecommenderConfig\x12;.google.cloud.recommender.v1.UpdateRecommenderConfigRequest\x1A..google.cloud.recommender.v1.RecommenderConfig\"\xD8\x02\xDAA\x1Erecommender_config,update_mask\x82\xD3\xE4\x93\x02\xB0\x022J/v1/{recommender_config.name=projects/*/locations/*/recommenders/*/config}:\x12recommender_configZe2O/v1/{recommender_config.name=organizations/*/locations/*/recommenders/*/config}:\x12recommender_configZg2Q/v1/{recommender_config.name=billingAccounts/*/locations/*/recommenders/*/config}:\x12recommender_config\x12\xCC\x02\x0A\x14GetInsightTypeConfig\x128.google.cloud.recommender.v1.GetInsightTypeConfigRequest\x1A..google.cloud.recommender.v1.InsightTypeConfig\"\xC9\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xBB\x01\x127/v1/{name=projects/*/locations/*/insightTypes/*/config}Z>\x12/v1/{name=billingAccounts/*/locations/*/insightTypes/*/config}\x12\xE8\x03\x0A\x17UpdateInsightTypeConfig\x12;.google.cloud.recommender.v1.UpdateInsightTypeConfigRequest\x1A..google.cloud.recommender.v1.InsightTypeConfig\"\xDF\x02\xDAA\x1Finsight_type_config,update_mask\x82\xD3\xE4\x93\x02\xB6\x022K/v1/{insight_type_config.name=projects/*/locations/*/insightTypes/*/config}:\x13insight_type_configZg2P/v1/{insight_type_config.name=organizations/*/locations/*/insightTypes/*/config}:\x13insight_type_configZi2R/v1/{insight_type_config.name=billingAccounts/*/locations/*/insightTypes/*/config}:\x13insight_type_config\x1AN\xCAA\x1Arecommender.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x9D\x01\x0A\x1Fcom.google.cloud.recommender.v1B\x10RecommenderProtoP\x01ZAcloud.google.com/go/recommender/apiv1/recommenderpb;recommenderpb\xA2\x02\x04CREC\xAA\x02\x1BGoogle.Cloud.Recommender.V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php deleted file mode 100644 index 103db5b03cf6..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/CostProjection.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.recommender.v1.CostProjection - */ -class CostProjection extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field .google.type.Money cost = 1; - */ - protected $cost = null; - /** - * Duration for which this cost applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $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; - */ - protected $cost_in_local_currency = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Money $cost - * 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. - * @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) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field .google.type.Money cost = 1; - * @return \Google\Type\Money|null - */ - public function getCost() - { - return $this->cost; - } - - public function hasCost() - { - return isset($this->cost); - } - - public function clearCost() - { - unset($this->cost); - } - - /** - * 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. - * - * Generated from protobuf field .google.type.Money cost = 1; - * @param \Google\Type\Money $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->cost = $var; - - return $this; - } - - /** - * Duration for which this cost applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration for which this cost applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $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/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php deleted file mode 100644 index ace4530310c9..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.recommender.v1.GetInsightRequest - */ -class GetInsightRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the insight. Please see - * {@see RecommenderClient::insightName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\GetInsightRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the insight. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php deleted file mode 100644 index 032e28d2b6d9..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetInsightTypeConfigRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.recommender.v1.GetInsightTypeConfigRequest - */ -class GetInsightTypeConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the InsightTypeConfig to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the InsightTypeConfig to get. - * - * Acceptable formats: - * - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * Please see {@see RecommenderClient::insightTypeConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\GetInsightTypeConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the InsightTypeConfig to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the InsightTypeConfig to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the InsightTypeConfig to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php deleted file mode 100644 index 99c72f314353..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommendationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.recommender.v1.GetRecommendationRequest - */ -class GetRecommendationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the recommendation. Please see - * {@see RecommenderClient::recommendationName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\GetRecommendationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the recommendation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php deleted file mode 100644 index 5272b06c2283..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/GetRecommenderConfigRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.recommender.v1.GetRecommenderConfigRequest - */ -class GetRecommenderConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Recommendation Config to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the Recommendation Config to get. - * - * Acceptable formats: - * - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * Please see {@see RecommenderClient::recommenderConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\GetRecommenderConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Recommendation Config to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Recommendation Config to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Recommendation Config to get. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php deleted file mode 100644 index 064a98d2a047..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.recommender.v1.Impact - */ -class Impact extends \Google\Protobuf\Internal\Message -{ - /** - * Category that is being targeted. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; - */ - protected $category = 0; - /** - * The service that this impact is associated with. - * - * Generated from protobuf field string service = 3; - */ - protected $service = ''; - protected $projection; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $category - * Category that is being targeted. - * @type \Google\Cloud\Recommender\V1\CostProjection $cost_projection - * Use with CategoryType.COST - * @type \Google\Cloud\Recommender\V1\SecurityProjection $security_projection - * Use with CategoryType.SECURITY - * @type \Google\Cloud\Recommender\V1\SustainabilityProjection $sustainability_projection - * Use with CategoryType.SUSTAINABILITY - * @type \Google\Cloud\Recommender\V1\ReliabilityProjection $reliability_projection - * Use with CategoryType.RELIABILITY - * @type string $service - * The service that this impact is associated with. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Category that is being targeted. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * Category that is being targeted. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact.Category category = 1; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Impact\Category::class); - $this->category = $var; - - return $this; - } - - /** - * Use with CategoryType.COST - * - * Generated from protobuf field .google.cloud.recommender.v1.CostProjection cost_projection = 100; - * @return \Google\Cloud\Recommender\V1\CostProjection|null - */ - public function getCostProjection() - { - return $this->readOneof(100); - } - - public function hasCostProjection() - { - return $this->hasOneof(100); - } - - /** - * Use with CategoryType.COST - * - * Generated from protobuf field .google.cloud.recommender.v1.CostProjection cost_projection = 100; - * @param \Google\Cloud\Recommender\V1\CostProjection $var - * @return $this - */ - public function setCostProjection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\CostProjection::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Use with CategoryType.SECURITY - * - * Generated from protobuf field .google.cloud.recommender.v1.SecurityProjection security_projection = 101; - * @return \Google\Cloud\Recommender\V1\SecurityProjection|null - */ - public function getSecurityProjection() - { - return $this->readOneof(101); - } - - public function hasSecurityProjection() - { - return $this->hasOneof(101); - } - - /** - * Use with CategoryType.SECURITY - * - * Generated from protobuf field .google.cloud.recommender.v1.SecurityProjection security_projection = 101; - * @param \Google\Cloud\Recommender\V1\SecurityProjection $var - * @return $this - */ - public function setSecurityProjection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\SecurityProjection::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Use with CategoryType.SUSTAINABILITY - * - * Generated from protobuf field .google.cloud.recommender.v1.SustainabilityProjection sustainability_projection = 102; - * @return \Google\Cloud\Recommender\V1\SustainabilityProjection|null - */ - public function getSustainabilityProjection() - { - return $this->readOneof(102); - } - - public function hasSustainabilityProjection() - { - return $this->hasOneof(102); - } - - /** - * Use with CategoryType.SUSTAINABILITY - * - * Generated from protobuf field .google.cloud.recommender.v1.SustainabilityProjection sustainability_projection = 102; - * @param \Google\Cloud\Recommender\V1\SustainabilityProjection $var - * @return $this - */ - public function setSustainabilityProjection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\SustainabilityProjection::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Use with CategoryType.RELIABILITY - * - * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; - * @return \Google\Cloud\Recommender\V1\ReliabilityProjection|null - */ - public function getReliabilityProjection() - { - return $this->readOneof(103); - } - - public function hasReliabilityProjection() - { - return $this->hasOneof(103); - } - - /** - * Use with CategoryType.RELIABILITY - * - * Generated from protobuf field .google.cloud.recommender.v1.ReliabilityProjection reliability_projection = 103; - * @param \Google\Cloud\Recommender\V1\ReliabilityProjection $var - * @return $this - */ - public function setReliabilityProjection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\ReliabilityProjection::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * The service that this impact is associated with. - * - * Generated from protobuf field string service = 3; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * The service that this impact is associated with. - * - * Generated from protobuf field string service = 3; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * @return string - */ - public function getProjection() - { - return $this->whichOneof("projection"); - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php deleted file mode 100644 index 64072358d665..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Impact/Category.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.recommender.v1.Impact.Category - */ -class Category -{ - /** - * Default unspecified category. Don't use directly. - * - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * Indicates a potential increase or decrease in cost. - * - * Generated from protobuf enum COST = 1; - */ - const COST = 1; - /** - * Indicates a potential increase or decrease in security. - * - * Generated from protobuf enum SECURITY = 2; - */ - const SECURITY = 2; - /** - * Indicates a potential increase or decrease in performance. - * - * Generated from protobuf enum PERFORMANCE = 3; - */ - const PERFORMANCE = 3; - /** - * Indicates a potential increase or decrease in manageability. - * - * Generated from protobuf enum MANAGEABILITY = 4; - */ - const MANAGEABILITY = 4; - /** - * Indicates a potential increase or decrease in sustainability. - * - * Generated from protobuf enum SUSTAINABILITY = 5; - */ - const SUSTAINABILITY = 5; - /** - * Indicates a potential increase or decrease in reliability. - * - * Generated from protobuf enum RELIABILITY = 6; - */ - const RELIABILITY = 6; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::COST => 'COST', - self::SECURITY => 'SECURITY', - self::PERFORMANCE => 'PERFORMANCE', - self::MANAGEABILITY => 'MANAGEABILITY', - self::SUSTAINABILITY => 'SUSTAINABILITY', - self::RELIABILITY => 'RELIABILITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php deleted file mode 100644 index 106f5c30272d..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight.php +++ /dev/null @@ -1,502 +0,0 @@ -google.cloud.recommender.v1.Insight - */ -class Insight extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Fully qualified resource names that this insight is targeting. - * - * Generated from protobuf field repeated string target_resources = 9; - */ - private $target_resources; - /** - * Insight subtype. Insight content schema will be stable for a given subtype. - * - * Generated from protobuf field string insight_subtype = 10; - */ - protected $insight_subtype = ''; - /** - * A struct of custom fields to explain the insight. - * Example: "grantedPermissionsCount": "1000" - * - * Generated from protobuf field .google.protobuf.Struct content = 3; - */ - protected $content = null; - /** - * Timestamp of the latest data used to generate the insight. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - */ - protected $last_refresh_time = null; - /** - * 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). - * - * Generated from protobuf field .google.protobuf.Duration observation_period = 5; - */ - protected $observation_period = null; - /** - * Information state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; - */ - protected $state_info = null; - /** - * Category being targeted by the insight. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; - */ - protected $category = 0; - /** - * Insight's severity. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; - */ - protected $severity = 0; - /** - * Fingerprint of the Insight. Provides optimistic locking when updating - * states. - * - * Generated from protobuf field string etag = 11; - */ - protected $etag = ''; - /** - * Recommendations derived from this insight. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; - */ - private $associated_recommendations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the insight. - * @type string $description - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * @type string[] $target_resources - * Fully qualified resource names that this insight is targeting. - * @type string $insight_subtype - * Insight subtype. Insight content schema will be stable for a given subtype. - * @type \Google\Protobuf\Struct $content - * A struct of custom fields to explain the insight. - * Example: "grantedPermissionsCount": "1000" - * @type \Google\Protobuf\Timestamp $last_refresh_time - * Timestamp of the latest data used to generate the insight. - * @type \Google\Protobuf\Duration $observation_period - * 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). - * @type \Google\Cloud\Recommender\V1\InsightStateInfo $state_info - * Information state and metadata. - * @type int $category - * Category being targeted by the insight. - * @type int $severity - * Insight's severity. - * @type string $etag - * Fingerprint of the Insight. Provides optimistic locking when updating - * states. - * @type \Google\Cloud\Recommender\V1\Insight\RecommendationReference[] $associated_recommendations - * Recommendations derived from this insight. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Fully qualified resource names that this insight is targeting. - * - * Generated from protobuf field repeated string target_resources = 9; - * @return RepeatedField - */ - public function getTargetResources() - { - return $this->target_resources; - } - - /** - * Fully qualified resource names that this insight is targeting. - * - * Generated from protobuf field repeated string target_resources = 9; - * @param string[] $var - * @return $this - */ - public function setTargetResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_resources = $arr; - - return $this; - } - - /** - * Insight subtype. Insight content schema will be stable for a given subtype. - * - * Generated from protobuf field string insight_subtype = 10; - * @return string - */ - public function getInsightSubtype() - { - return $this->insight_subtype; - } - - /** - * Insight subtype. Insight content schema will be stable for a given subtype. - * - * Generated from protobuf field string insight_subtype = 10; - * @param string $var - * @return $this - */ - public function setInsightSubtype($var) - { - GPBUtil::checkString($var, True); - $this->insight_subtype = $var; - - return $this; - } - - /** - * A struct of custom fields to explain the insight. - * Example: "grantedPermissionsCount": "1000" - * - * Generated from protobuf field .google.protobuf.Struct content = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * A struct of custom fields to explain the insight. - * Example: "grantedPermissionsCount": "1000" - * - * Generated from protobuf field .google.protobuf.Struct content = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->content = $var; - - return $this; - } - - /** - * Timestamp of the latest data used to generate the insight. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastRefreshTime() - { - return $this->last_refresh_time; - } - - public function hasLastRefreshTime() - { - return isset($this->last_refresh_time); - } - - public function clearLastRefreshTime() - { - unset($this->last_refresh_time); - } - - /** - * Timestamp of the latest data used to generate the insight. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastRefreshTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_refresh_time = $var; - - return $this; - } - - /** - * 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). - * - * Generated from protobuf field .google.protobuf.Duration observation_period = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getObservationPeriod() - { - return $this->observation_period; - } - - public function hasObservationPeriod() - { - return isset($this->observation_period); - } - - public function clearObservationPeriod() - { - unset($this->observation_period); - } - - /** - * 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). - * - * Generated from protobuf field .google.protobuf.Duration observation_period = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setObservationPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->observation_period = $var; - - return $this; - } - - /** - * Information state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; - * @return \Google\Cloud\Recommender\V1\InsightStateInfo|null - */ - public function getStateInfo() - { - return $this->state_info; - } - - public function hasStateInfo() - { - return isset($this->state_info); - } - - public function clearStateInfo() - { - unset($this->state_info); - } - - /** - * Information state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo state_info = 6; - * @param \Google\Cloud\Recommender\V1\InsightStateInfo $var - * @return $this - */ - public function setStateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightStateInfo::class); - $this->state_info = $var; - - return $this; - } - - /** - * Category being targeted by the insight. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; - * @return int - */ - public function getCategory() - { - return $this->category; - } - - /** - * Category being targeted by the insight. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Category category = 7; - * @param int $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Insight\Category::class); - $this->category = $var; - - return $this; - } - - /** - * Insight's severity. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Insight's severity. - * - * Generated from protobuf field .google.cloud.recommender.v1.Insight.Severity severity = 15; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Insight\Severity::class); - $this->severity = $var; - - return $this; - } - - /** - * Fingerprint of the Insight. Provides optimistic locking when updating - * states. - * - * Generated from protobuf field string etag = 11; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Fingerprint of the Insight. Provides optimistic locking when updating - * states. - * - * Generated from protobuf field string etag = 11; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Recommendations derived from this insight. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Insight\RecommendationReference> - */ - public function getAssociatedRecommendations() - { - return $this->associated_recommendations; - } - - /** - * Recommendations derived from this insight. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8; - * @param \Google\Cloud\Recommender\V1\Insight\RecommendationReference[] $var - * @return $this - */ - public function setAssociatedRecommendations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Insight\RecommendationReference::class); - $this->associated_recommendations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php deleted file mode 100644 index 7943fc37cf74..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Category.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.recommender.v1.Insight.Category - */ -class Category -{ - /** - * Unspecified category. - * - * Generated from protobuf enum CATEGORY_UNSPECIFIED = 0; - */ - const CATEGORY_UNSPECIFIED = 0; - /** - * The insight is related to cost. - * - * Generated from protobuf enum COST = 1; - */ - const COST = 1; - /** - * The insight is related to security. - * - * Generated from protobuf enum SECURITY = 2; - */ - const SECURITY = 2; - /** - * The insight is related to performance. - * - * Generated from protobuf enum PERFORMANCE = 3; - */ - const PERFORMANCE = 3; - /** - * This insight is related to manageability. - * - * Generated from protobuf enum MANAGEABILITY = 4; - */ - const MANAGEABILITY = 4; - /** - * The insight is related to sustainability. - * - * Generated from protobuf enum SUSTAINABILITY = 5; - */ - const SUSTAINABILITY = 5; - /** - * This insight is related to reliability. - * - * Generated from protobuf enum RELIABILITY = 6; - */ - const RELIABILITY = 6; - - private static $valueToName = [ - self::CATEGORY_UNSPECIFIED => 'CATEGORY_UNSPECIFIED', - self::COST => 'COST', - self::SECURITY => 'SECURITY', - self::PERFORMANCE => 'PERFORMANCE', - self::MANAGEABILITY => 'MANAGEABILITY', - self::SUSTAINABILITY => 'SUSTAINABILITY', - self::RELIABILITY => 'RELIABILITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php deleted file mode 100644 index a5257a75d77e..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/RecommendationReference.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.recommender.v1.Insight.RecommendationReference - */ -class RecommendationReference extends \Google\Protobuf\Internal\Message -{ - /** - * Recommendation resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] - * - * Generated from protobuf field string recommendation = 1; - */ - protected $recommendation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $recommendation - * Recommendation resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); - parent::__construct($data); - } - - /** - * Recommendation resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] - * - * Generated from protobuf field string recommendation = 1; - * @return string - */ - public function getRecommendation() - { - return $this->recommendation; - } - - /** - * Recommendation resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID] - * - * Generated from protobuf field string recommendation = 1; - * @param string $var - * @return $this - */ - public function setRecommendation($var) - { - GPBUtil::checkString($var, True); - $this->recommendation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php deleted file mode 100644 index 1190d15108a4..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Insight/Severity.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recommender.v1.Insight.Severity - */ -class Severity -{ - /** - * Insight has unspecified severity. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Insight has low severity. - * - * Generated from protobuf enum LOW = 1; - */ - const LOW = 1; - /** - * Insight has medium severity. - * - * Generated from protobuf enum MEDIUM = 2; - */ - const MEDIUM = 2; - /** - * Insight has high severity. - * - * Generated from protobuf enum HIGH = 3; - */ - const HIGH = 3; - /** - * Insight has critical severity. - * - * Generated from protobuf enum CRITICAL = 4; - */ - const CRITICAL = 4; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::LOW => 'LOW', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::CRITICAL => 'CRITICAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php deleted file mode 100644 index 46cff011fb94..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.recommender.v1.InsightStateInfo - */ -class InsightStateInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Insight state. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; - */ - protected $state = 0; - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - */ - private $state_metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Insight state. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * A map of metadata for the state, provided by user or automations systems. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Insight::initOnce(); - parent::__construct($data); - } - - /** - * Insight state. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Insight state. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightStateInfo.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\InsightStateInfo\State::class); - $this->state = $var; - - return $this; - } - - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php deleted file mode 100644 index 191ef39ddbea..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightStateInfo/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.recommender.v1.InsightStateInfo.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Insight is active. Content for ACTIVE insights can be updated by Google. - * ACTIVE insights can be marked DISMISSED OR ACCEPTED. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Some action has been taken based on this insight. Insights become - * accepted when a recommendation derived from the insight has been marked - * CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked - * ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED - * insights can only be marked ACCEPTED (which may update state metadata). - * - * Generated from protobuf enum ACCEPTED = 2; - */ - const ACCEPTED = 2; - /** - * Insight is dismissed. Content for DISMISSED insights can be updated by - * Google. DISMISSED insights can be marked as ACTIVE. - * - * Generated from protobuf enum DISMISSED = 3; - */ - const DISMISSED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::ACCEPTED => 'ACCEPTED', - self::DISMISSED => 'DISMISSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php deleted file mode 100644 index 8b5e9258437d..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeConfig.php +++ /dev/null @@ -1,347 +0,0 @@ -google.cloud.recommender.v1.InsightTypeConfig - */ -class InsightTypeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of insight type config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * InsightTypeGenerationConfig which configures the generation of - * insights for this insight type. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; - */ - protected $insight_type_generation_config = null; - /** - * Fingerprint of the InsightTypeConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - */ - private $annotations; - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of insight type config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config - * @type \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig $insight_type_generation_config - * InsightTypeGenerationConfig which configures the generation of - * insights for this insight type. - * @type string $etag - * Fingerprint of the InsightTypeConfig. Provides optimistic locking when - * updating. - * @type \Google\Protobuf\Timestamp $update_time - * Last time when the config was updated. - * @type string $revision_id - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type string $display_name - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\InsightTypeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of insight type config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of insight type config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * InsightTypeGenerationConfig which configures the generation of - * insights for this insight type. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; - * @return \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig|null - */ - public function getInsightTypeGenerationConfig() - { - return $this->insight_type_generation_config; - } - - public function hasInsightTypeGenerationConfig() - { - return isset($this->insight_type_generation_config); - } - - public function clearInsightTypeGenerationConfig() - { - unset($this->insight_type_generation_config); - } - - /** - * InsightTypeGenerationConfig which configures the generation of - * insights for this insight type. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeGenerationConfig insight_type_generation_config = 2; - * @param \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig $var - * @return $this - */ - public function setInsightTypeGenerationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightTypeGenerationConfig::class); - $this->insight_type_generation_config = $var; - - return $this; - } - - /** - * Fingerprint of the InsightTypeConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Fingerprint of the InsightTypeConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php deleted file mode 100644 index f10163c52b4b..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/InsightTypeGenerationConfig.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.recommender.v1.InsightTypeGenerationConfig - */ -class InsightTypeGenerationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters for this InsightTypeGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - */ - protected $params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $params - * Parameters for this InsightTypeGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\InsightTypeConfig::initOnce(); - parent::__construct($data); - } - - /** - * Parameters for this InsightTypeGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getParams() - { - return $this->params; - } - - public function hasParams() - { - return isset($this->params); - } - - public function clearParams() - { - unset($this->params); - } - - /** - * Parameters for this InsightTypeGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParams($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php deleted file mode 100644 index 07e9945da238..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsRequest.php +++ /dev/null @@ -1,319 +0,0 @@ -google.cloud.recommender.v1.ListInsightsRequest - */ -class ListInsightsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * INSIGHT_TYPE_ID refers to supported insight types: - * https://cloud.google.com/recommender/docs/insights/insight-types. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter expression to restrict the insights returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The container resource on which to execute the request. - * Acceptable formats: - * - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * - * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * INSIGHT_TYPE_ID refers to supported insight types: - * https://cloud.google.com/recommender/docs/insights/insight-types. Please see - * {@see RecommenderClient::insightTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\ListInsightsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * INSIGHT_TYPE_ID refers to supported insight types: - * https://cloud.google.com/recommender/docs/insights/insight-types. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * @type string $page_token - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * @type string $filter - * Optional. Filter expression to restrict the insights returned. Supported - * filter fields: - * * `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) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * INSIGHT_TYPE_ID refers to supported insight types: - * https://cloud.google.com/recommender/docs/insights/insight-types. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * INSIGHT_TYPE_ID refers to supported insight types: - * https://cloud.google.com/recommender/docs/insights/insight-types. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter expression to restrict the insights returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression to restrict the insights returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php deleted file mode 100644 index 565cbc3c1e45..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListInsightsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recommender.v1.ListInsightsResponse - */ -class ListInsightsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The set of insights for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; - */ - private $insights; - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\Insight[] $insights - * The set of insights for the `parent` resource. - * @type string $next_page_token - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * The set of insights for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Insight> - */ - public function getInsights() - { - return $this->insights; - } - - /** - * The set of insights for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Insight insights = 1; - * @param \Google\Cloud\Recommender\V1\Insight[] $var - * @return $this - */ - public function setInsights($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Insight::class); - $this->insights = $arr; - - return $this; - } - - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php deleted file mode 100644 index ae00bf92eaba..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsRequest.php +++ /dev/null @@ -1,378 +0,0 @@ -google.cloud.recommender.v1.ListRecommendationsRequest - */ -class ListRecommendationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Filter expression to restrict the recommendations returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The container resource on which to execute the request. - * Acceptable formats: - * - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. Please see - * {@see RecommenderClient::recommenderName()} for help formatting this field. - * - * @return \Google\Cloud\Recommender\V1\ListRecommendationsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * @param string $parent Required. The container resource on which to execute the request. - * Acceptable formats: - * - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. Please see - * {@see RecommenderClient::recommenderName()} for help formatting this field. - * @param string $filter Filter expression to restrict the recommendations returned. Supported - * filter fields: - * - * * `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) - * - * @return \Google\Cloud\Recommender\V1\ListRecommendationsRequest - * - * @experimental - */ - public static function buildFromParentFilter(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * @type string $page_token - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * @type string $filter - * Filter expression to restrict the recommendations returned. Supported - * filter fields: - * * `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) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The container resource on which to execute the request. - * Acceptable formats: - * * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` - * LOCATION here refers to GCP Locations: - * https://cloud.google.com/about/locations/ - * RECOMMENDER_ID refers to supported recommenders: - * https://cloud.google.com/recommender/docs/recommenders. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. If not specified, the server will - * determine the number of results to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, retrieves the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters must be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter expression to restrict the recommendations returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter expression to restrict the recommendations returned. Supported - * filter fields: - * * `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) - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php deleted file mode 100644 index 91ecba4ce0fe..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ListRecommendationsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.recommender.v1.ListRecommendationsResponse - */ -class ListRecommendationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The set of recommendations for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; - */ - private $recommendations; - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\Recommendation[] $recommendations - * The set of recommendations for the `parent` resource. - * @type string $next_page_token - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * The set of recommendations for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Recommendation> - */ - public function getRecommendations() - { - return $this->recommendations; - } - - /** - * The set of recommendations for the `parent` resource. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation recommendations = 1; - * @param \Google\Cloud\Recommender\V1\Recommendation[] $var - * @return $this - */ - public function setRecommendations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Recommendation::class); - $this->recommendations = $arr; - - return $this; - } - - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be used to request the next page of results. This field is - * empty if there are no additional results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php deleted file mode 100644 index 65d8c4d21839..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkInsightAcceptedRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.recommender.v1.MarkInsightAcceptedRequest - */ -class MarkInsightAcceptedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. State properties user wish to include with this state. Full - * replace of the current state_metadata. - * - * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $state_metadata; - /** - * Required. Fingerprint of the Insight. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the insight. Please see - * {@see RecommenderClient::insightName()} for help formatting this field. - * @param array $stateMetadata Optional. State properties user wish to include with this state. Full - * replace of the current state_metadata. - * @param string $etag Required. Fingerprint of the Insight. Provides optimistic locking. - * - * @return \Google\Cloud\Recommender\V1\MarkInsightAcceptedRequest - * - * @experimental - */ - public static function build(string $name, array $stateMetadata, string $etag): self - { - return (new self()) - ->setName($name) - ->setStateMetadata($stateMetadata) - ->setEtag($etag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the insight. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * Optional. State properties user wish to include with this state. Full - * replace of the current state_metadata. - * @type string $etag - * Required. Fingerprint of the Insight. Provides optimistic locking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the insight. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. State properties user wish to include with this state. Full - * replace of the current state_metadata. - * - * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * Optional. State properties user wish to include with this state. Full - * replace of the current state_metadata. - * - * Generated from protobuf field map state_metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - - /** - * Required. Fingerprint of the Insight. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. Fingerprint of the Insight. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php deleted file mode 100644 index 5e9fcd7cb0b2..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationClaimedRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.recommender.v1.MarkRecommendationClaimedRequest - */ -class MarkRecommendationClaimedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - */ - private $state_metadata; - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the recommendation. Please see - * {@see RecommenderClient::recommendationName()} for help formatting this field. - * @param array $stateMetadata State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * @return \Google\Cloud\Recommender\V1\MarkRecommendationClaimedRequest - * - * @experimental - */ - public static function build(string $name, array $stateMetadata, string $etag): self - { - return (new self()) - ->setName($name) - ->setStateMetadata($stateMetadata) - ->setEtag($etag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the recommendation. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @type string $etag - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php deleted file mode 100644 index d03304a46fc9..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationDismissedRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.recommender.v1.MarkRecommendationDismissedRequest - */ -class MarkRecommendationDismissedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the recommendation. - * @type string $etag - * Fingerprint of the Recommendation. Provides optimistic locking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php deleted file mode 100644 index f829ea280575..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationFailedRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.recommender.v1.MarkRecommendationFailedRequest - */ -class MarkRecommendationFailedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - */ - private $state_metadata; - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the recommendation. Please see - * {@see RecommenderClient::recommendationName()} for help formatting this field. - * @param array $stateMetadata State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * @return \Google\Cloud\Recommender\V1\MarkRecommendationFailedRequest - * - * @experimental - */ - public static function build(string $name, array $stateMetadata, string $etag): self - { - return (new self()) - ->setName($name) - ->setStateMetadata($stateMetadata) - ->setEtag($etag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the recommendation. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @type string $etag - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php deleted file mode 100644 index 992334b5dee6..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/MarkRecommendationSucceededRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.recommender.v1.MarkRecommendationSucceededRequest - */ -class MarkRecommendationSucceededRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - */ - private $state_metadata; - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the recommendation. Please see - * {@see RecommenderClient::recommendationName()} for help formatting this field. - * @param array $stateMetadata State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @param string $etag Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * @return \Google\Cloud\Recommender\V1\MarkRecommendationSucceededRequest - * - * @experimental - */ - public static function build(string $name, array $stateMetadata, string $etag): self - { - return (new self()) - ->setName($name) - ->setStateMetadata($stateMetadata) - ->setEtag($etag); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the recommendation. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * @type string $etag - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * State properties to include with this state. Overwrites any existing - * `state_metadata`. - * Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`. - * Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`. - * - * Generated from protobuf field map state_metadata = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Required. Fingerprint of the Recommendation. Provides optimistic locking. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php deleted file mode 100644 index 5514a8df0ff3..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Operation.php +++ /dev/null @@ -1,564 +0,0 @@ -google.cloud.recommender.v1.Operation - */ -class Operation extends \Google\Protobuf\Internal\Message -{ - /** - * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', - * 'copy', 'test' and custom operations. This field is case-insensitive and - * always populated. - * - * Generated from protobuf field string action = 1; - */ - protected $action = ''; - /** - * Type of GCP resource being modified/tested. This field is always populated. - * Example: cloudresourcemanager.googleapis.com/Project, - * compute.googleapis.com/Instance - * - * Generated from protobuf field string resource_type = 2; - */ - protected $resource_type = ''; - /** - * Contains the fully qualified resource name. This field is always populated. - * ex: //cloudresourcemanager.googleapis.com/projects/foo. - * - * Generated from protobuf field string resource = 3; - */ - protected $resource = ''; - /** - * 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. - * - * Generated from protobuf field string path = 4; - */ - protected $path = ''; - /** - * 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 = and resource_name = . - * This field is empty for all other values of `action`. - * - * Generated from protobuf field string source_resource = 5; - */ - protected $source_resource = ''; - /** - * 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. - * - * Generated from protobuf field string source_path = 6; - */ - protected $source_path = ''; - /** - * 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. - * - * Generated from protobuf field map path_filters = 8; - */ - private $path_filters; - /** - * 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. - * - * Generated from protobuf field map path_value_matchers = 11; - */ - private $path_value_matchers; - protected $path_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $action - * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', - * 'copy', 'test' and custom operations. This field is case-insensitive and - * always populated. - * @type string $resource_type - * Type of GCP resource being modified/tested. This field is always populated. - * Example: cloudresourcemanager.googleapis.com/Project, - * compute.googleapis.com/Instance - * @type string $resource - * Contains the fully qualified resource name. This field is always populated. - * ex: //cloudresourcemanager.googleapis.com/projects/foo. - * @type string $path - * 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. - * @type string $source_resource - * 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 = and resource_name = . - * This field is empty for all other values of `action`. - * @type string $source_path - * 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. - * @type \Google\Protobuf\Value $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. - * @type \Google\Cloud\Recommender\V1\ValueMatcher $value_matcher - * 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. - * @type array|\Google\Protobuf\Internal\MapField $path_filters - * 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. - * @type array|\Google\Protobuf\Internal\MapField $path_value_matchers - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', - * 'copy', 'test' and custom operations. This field is case-insensitive and - * always populated. - * - * Generated from protobuf field string action = 1; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', - * 'copy', 'test' and custom operations. This field is case-insensitive and - * always populated. - * - * Generated from protobuf field string action = 1; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * Type of GCP resource being modified/tested. This field is always populated. - * Example: cloudresourcemanager.googleapis.com/Project, - * compute.googleapis.com/Instance - * - * Generated from protobuf field string resource_type = 2; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Type of GCP resource being modified/tested. This field is always populated. - * Example: cloudresourcemanager.googleapis.com/Project, - * compute.googleapis.com/Instance - * - * Generated from protobuf field string resource_type = 2; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - - /** - * Contains the fully qualified resource name. This field is always populated. - * ex: //cloudresourcemanager.googleapis.com/projects/foo. - * - * Generated from protobuf field string resource = 3; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Contains the fully qualified resource name. This field is always populated. - * ex: //cloudresourcemanager.googleapis.com/projects/foo. - * - * Generated from protobuf field string resource = 3; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string path = 4; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * 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. - * - * Generated from protobuf field string path = 4; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * 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 = and resource_name = . - * This field is empty for all other values of `action`. - * - * Generated from protobuf field string source_resource = 5; - * @return string - */ - public function getSourceResource() - { - return $this->source_resource; - } - - /** - * 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 = and resource_name = . - * This field is empty for all other values of `action`. - * - * Generated from protobuf field string source_resource = 5; - * @param string $var - * @return $this - */ - public function setSourceResource($var) - { - GPBUtil::checkString($var, True); - $this->source_resource = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string source_path = 6; - * @return string - */ - public function getSourcePath() - { - return $this->source_path; - } - - /** - * 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. - * - * Generated from protobuf field string source_path = 6; - * @param string $var - * @return $this - */ - public function setSourcePath($var) - { - GPBUtil::checkString($var, True); - $this->source_path = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.Value value = 7; - * @return \Google\Protobuf\Value|null - */ - public function getValue() - { - return $this->readOneof(7); - } - - public function hasValue() - { - return $this->hasOneof(7); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.Value value = 7; - * @param \Google\Protobuf\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.cloud.recommender.v1.ValueMatcher value_matcher = 10; - * @return \Google\Cloud\Recommender\V1\ValueMatcher|null - */ - public function getValueMatcher() - { - return $this->readOneof(10); - } - - public function hasValueMatcher() - { - return $this->hasOneof(10); - } - - /** - * 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. - * - * Generated from protobuf field .google.cloud.recommender.v1.ValueMatcher value_matcher = 10; - * @param \Google\Cloud\Recommender\V1\ValueMatcher $var - * @return $this - */ - public function setValueMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\ValueMatcher::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field map path_filters = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPathFilters() - { - return $this->path_filters; - } - - /** - * 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. - * - * Generated from protobuf field map path_filters = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPathFilters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->path_filters = $arr; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field map path_value_matchers = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPathValueMatchers() - { - return $this->path_value_matchers; - } - - /** - * 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. - * - * Generated from protobuf field map path_value_matchers = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPathValueMatchers($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\ValueMatcher::class); - $this->path_value_matchers = $arr; - - return $this; - } - - /** - * @return string - */ - public function getPathValue() - { - return $this->whichOneof("path_value"); - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php deleted file mode 100644 index 9aa61b2da10c..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/OperationGroup.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.recommender.v1.OperationGroup - */ -class OperationGroup extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; - */ - private $operations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\Operation[] $operations - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Operation> - */ - public function getOperations() - { - return $this->operations; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Operation operations = 1; - * @param \Google\Cloud\Recommender\V1\Operation[] $var - * @return $this - */ - public function setOperations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Operation::class); - $this->operations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php deleted file mode 100644 index dffee7b09da0..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation.php +++ /dev/null @@ -1,580 +0,0 @@ -google.cloud.recommender.v1.Recommendation - */ -class Recommendation extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * 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" - * - * Generated from protobuf field string recommender_subtype = 12; - */ - protected $recommender_subtype = ''; - /** - * Last time this recommendation was refreshed by the system that created it - * in the first place. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - */ - protected $last_refresh_time = null; - /** - * The primary impact that this recommendation can have while trying to - * optimize for one category. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; - */ - protected $primary_impact = null; - /** - * Optional set of additional impact that this recommendation may have when - * trying to optimize for the primary category. These may be positive - * or negative. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; - */ - private $additional_impact; - /** - * Recommendation's priority. - * - * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; - */ - protected $priority = 0; - /** - * Content of the recommendation describing recommended changes to resources. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; - */ - protected $content = null; - /** - * Information for state. Contains state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; - */ - protected $state_info = null; - /** - * Fingerprint of the Recommendation. Provides optimistic locking when - * updating states. - * - * Generated from protobuf field string etag = 11; - */ - protected $etag = ''; - /** - * Insights that led to this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; - */ - private $associated_insights; - /** - * 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. - * - * Generated from protobuf field string xor_group_id = 18; - */ - protected $xor_group_id = ''; - /** - * Fully qualified resource names that this recommendation is targeting. - * - * Generated from protobuf field repeated string target_resources = 19; - */ - private $target_resources; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of recommendation. - * @type string $description - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * @type string $recommender_subtype - * 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" - * @type \Google\Protobuf\Timestamp $last_refresh_time - * Last time this recommendation was refreshed by the system that created it - * in the first place. - * @type \Google\Cloud\Recommender\V1\Impact $primary_impact - * The primary impact that this recommendation can have while trying to - * optimize for one category. - * @type \Google\Cloud\Recommender\V1\Impact[] $additional_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. - * @type int $priority - * Recommendation's priority. - * @type \Google\Cloud\Recommender\V1\RecommendationContent $content - * Content of the recommendation describing recommended changes to resources. - * @type \Google\Cloud\Recommender\V1\RecommendationStateInfo $state_info - * Information for state. Contains state and metadata. - * @type string $etag - * Fingerprint of the Recommendation. Provides optimistic locking when - * updating states. - * @type \Google\Cloud\Recommender\V1\Recommendation\InsightReference[] $associated_insights - * Insights that led to this recommendation. - * @type string $xor_group_id - * 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. - * @type string[] $target_resources - * Fully qualified resource names that this recommendation is targeting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of recommendation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-form human readable summary in English. The maximum length is 500 - * characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * 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" - * - * Generated from protobuf field string recommender_subtype = 12; - * @return string - */ - public function getRecommenderSubtype() - { - return $this->recommender_subtype; - } - - /** - * 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" - * - * Generated from protobuf field string recommender_subtype = 12; - * @param string $var - * @return $this - */ - public function setRecommenderSubtype($var) - { - GPBUtil::checkString($var, True); - $this->recommender_subtype = $var; - - return $this; - } - - /** - * Last time this recommendation was refreshed by the system that created it - * in the first place. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastRefreshTime() - { - return $this->last_refresh_time; - } - - public function hasLastRefreshTime() - { - return isset($this->last_refresh_time); - } - - public function clearLastRefreshTime() - { - unset($this->last_refresh_time); - } - - /** - * Last time this recommendation was refreshed by the system that created it - * in the first place. - * - * Generated from protobuf field .google.protobuf.Timestamp last_refresh_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastRefreshTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_refresh_time = $var; - - return $this; - } - - /** - * The primary impact that this recommendation can have while trying to - * optimize for one category. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; - * @return \Google\Cloud\Recommender\V1\Impact|null - */ - public function getPrimaryImpact() - { - return $this->primary_impact; - } - - public function hasPrimaryImpact() - { - return isset($this->primary_impact); - } - - public function clearPrimaryImpact() - { - unset($this->primary_impact); - } - - /** - * The primary impact that this recommendation can have while trying to - * optimize for one category. - * - * Generated from protobuf field .google.cloud.recommender.v1.Impact primary_impact = 5; - * @param \Google\Cloud\Recommender\V1\Impact $var - * @return $this - */ - public function setPrimaryImpact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\Impact::class); - $this->primary_impact = $var; - - return $this; - } - - /** - * Optional set of additional impact that this recommendation may have when - * trying to optimize for the primary category. These may be positive - * or negative. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Impact> - */ - public function getAdditionalImpact() - { - return $this->additional_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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Impact additional_impact = 6; - * @param \Google\Cloud\Recommender\V1\Impact[] $var - * @return $this - */ - public function setAdditionalImpact($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Impact::class); - $this->additional_impact = $arr; - - return $this; - } - - /** - * Recommendation's priority. - * - * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Recommendation's priority. - * - * Generated from protobuf field .google.cloud.recommender.v1.Recommendation.Priority priority = 17; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\Recommendation\Priority::class); - $this->priority = $var; - - return $this; - } - - /** - * Content of the recommendation describing recommended changes to resources. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; - * @return \Google\Cloud\Recommender\V1\RecommendationContent|null - */ - public function getContent() - { - return $this->content; - } - - public function hasContent() - { - return isset($this->content); - } - - public function clearContent() - { - unset($this->content); - } - - /** - * Content of the recommendation describing recommended changes to resources. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationContent content = 7; - * @param \Google\Cloud\Recommender\V1\RecommendationContent $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommendationContent::class); - $this->content = $var; - - return $this; - } - - /** - * Information for state. Contains state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; - * @return \Google\Cloud\Recommender\V1\RecommendationStateInfo|null - */ - public function getStateInfo() - { - return $this->state_info; - } - - public function hasStateInfo() - { - return isset($this->state_info); - } - - public function clearStateInfo() - { - unset($this->state_info); - } - - /** - * Information for state. Contains state and metadata. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10; - * @param \Google\Cloud\Recommender\V1\RecommendationStateInfo $var - * @return $this - */ - public function setStateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommendationStateInfo::class); - $this->state_info = $var; - - return $this; - } - - /** - * Fingerprint of the Recommendation. Provides optimistic locking when - * updating states. - * - * Generated from protobuf field string etag = 11; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Fingerprint of the Recommendation. Provides optimistic locking when - * updating states. - * - * Generated from protobuf field string etag = 11; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Insights that led to this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; - * @return RepeatedField<\Google\Cloud\Recommender\V1\Recommendation\InsightReference> - */ - public function getAssociatedInsights() - { - return $this->associated_insights; - } - - /** - * Insights that led to this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14; - * @param \Google\Cloud\Recommender\V1\Recommendation\InsightReference[] $var - * @return $this - */ - public function setAssociatedInsights($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Recommendation\InsightReference::class); - $this->associated_insights = $arr; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string xor_group_id = 18; - * @return string - */ - public function getXorGroupId() - { - return $this->xor_group_id; - } - - /** - * 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. - * - * Generated from protobuf field string xor_group_id = 18; - * @param string $var - * @return $this - */ - public function setXorGroupId($var) - { - GPBUtil::checkString($var, True); - $this->xor_group_id = $var; - - return $this; - } - - /** - * Fully qualified resource names that this recommendation is targeting. - * - * Generated from protobuf field repeated string target_resources = 19; - * @return RepeatedField - */ - public function getTargetResources() - { - return $this->target_resources; - } - - /** - * Fully qualified resource names that this recommendation is targeting. - * - * Generated from protobuf field repeated string target_resources = 19; - * @param string[] $var - * @return $this - */ - public function setTargetResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_resources = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php deleted file mode 100644 index 1bec6c533c5f..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/InsightReference.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.recommender.v1.Recommendation.InsightReference - */ -class InsightReference extends \Google\Protobuf\Internal\Message -{ - /** - * Insight resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] - * - * Generated from protobuf field string insight = 1; - */ - protected $insight = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $insight - * Insight resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Insight resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] - * - * Generated from protobuf field string insight = 1; - * @return string - */ - public function getInsight() - { - return $this->insight; - } - - /** - * Insight resource name, e.g. - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID] - * - * Generated from protobuf field string insight = 1; - * @param string $var - * @return $this - */ - public function setInsight($var) - { - GPBUtil::checkString($var, True); - $this->insight = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php deleted file mode 100644 index dc2b823d14f1..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/Recommendation/Priority.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.recommender.v1.Recommendation.Priority - */ -class Priority -{ - /** - * Recommendation has unspecified priority. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Recommendation has P4 priority (lowest priority). - * - * Generated from protobuf enum P4 = 1; - */ - const P4 = 1; - /** - * Recommendation has P3 priority (second lowest priority). - * - * Generated from protobuf enum P3 = 2; - */ - const P3 = 2; - /** - * Recommendation has P2 priority (second highest priority). - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Recommendation has P1 priority (highest priority). - * - * Generated from protobuf enum P1 = 4; - */ - const P1 = 4; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P4 => 'P4', - self::P3 => 'P3', - self::P2 => 'P2', - self::P1 => 'P1', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php deleted file mode 100644 index dec286b2e30e..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationContent.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.recommender.v1.RecommendationContent - */ -class RecommendationContent extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; - */ - private $operation_groups; - /** - * Condensed overview information about the recommendation. - * - * Generated from protobuf field .google.protobuf.Struct overview = 3; - */ - protected $overview = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\OperationGroup[] $operation_groups - * 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. - * @type \Google\Protobuf\Struct $overview - * Condensed overview information about the recommendation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; - * @return RepeatedField<\Google\Cloud\Recommender\V1\OperationGroup> - */ - public function getOperationGroups() - { - return $this->operation_groups; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.OperationGroup operation_groups = 2; - * @param \Google\Cloud\Recommender\V1\OperationGroup[] $var - * @return $this - */ - public function setOperationGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\OperationGroup::class); - $this->operation_groups = $arr; - - return $this; - } - - /** - * Condensed overview information about the recommendation. - * - * Generated from protobuf field .google.protobuf.Struct overview = 3; - * @return \Google\Protobuf\Struct|null - */ - public function getOverview() - { - return $this->overview; - } - - public function hasOverview() - { - return isset($this->overview); - } - - public function clearOverview() - { - unset($this->overview); - } - - /** - * Condensed overview information about the recommendation. - * - * Generated from protobuf field .google.protobuf.Struct overview = 3; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setOverview($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->overview = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php deleted file mode 100644 index d85e81828e79..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.recommender.v1.RecommendationStateInfo - */ -class RecommendationStateInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; - */ - protected $state = 0; - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - */ - private $state_metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. - * @type array|\Google\Protobuf\Internal\MapField $state_metadata - * A map of metadata for the state, provided by user or automations systems. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommendationStateInfo.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Recommender\V1\RecommendationStateInfo\State::class); - $this->state = $var; - - return $this; - } - - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getStateMetadata() - { - return $this->state_metadata; - } - - /** - * A map of metadata for the state, provided by user or automations systems. - * - * Generated from protobuf field map state_metadata = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setStateMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->state_metadata = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php deleted file mode 100644 index 13e4a5da871f..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommendationStateInfo/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.recommender.v1.RecommendationStateInfo.State - */ -class State -{ - /** - * Default state. Don't use directly. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Recommendation is active and can be applied. Recommendations content can - * be updated by Google. - * ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Recommendation is in claimed state. Recommendations content is - * immutable and cannot be updated by Google. - * CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED. - * - * Generated from protobuf enum CLAIMED = 6; - */ - const CLAIMED = 6; - /** - * Recommendation is in succeeded state. Recommendations content is - * immutable and cannot be updated by Google. - * SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * Recommendation is in failed state. Recommendations content is immutable - * and cannot be updated by Google. - * FAILED recommendations can be marked as SUCCEEDED, or FAILED. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * Recommendation is in dismissed state. Recommendation content can be - * updated by Google. - * DISMISSED recommendations can be marked as ACTIVE. - * - * Generated from protobuf enum DISMISSED = 5; - */ - const DISMISSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CLAIMED => 'CLAIMED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::DISMISSED => 'DISMISSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php deleted file mode 100644 index b000d1dda93c..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderConfig.php +++ /dev/null @@ -1,347 +0,0 @@ -google.cloud.recommender.v1.RecommenderConfig - */ -class RecommenderConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of recommender config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * RecommenderGenerationConfig which configures the Generation of - * recommendations for this recommender. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; - */ - protected $recommender_generation_config = null; - /** - * Fingerprint of the RecommenderConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - */ - private $annotations; - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of recommender config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config - * @type \Google\Cloud\Recommender\V1\RecommenderGenerationConfig $recommender_generation_config - * RecommenderGenerationConfig which configures the Generation of - * recommendations for this recommender. - * @type string $etag - * Fingerprint of the RecommenderConfig. Provides optimistic locking when - * updating. - * @type \Google\Protobuf\Timestamp $update_time - * Last time when the config was updated. - * @type string $revision_id - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * @type string $display_name - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderConfig::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of recommender config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of recommender config. - * Eg, - * projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * RecommenderGenerationConfig which configures the Generation of - * recommendations for this recommender. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; - * @return \Google\Cloud\Recommender\V1\RecommenderGenerationConfig|null - */ - public function getRecommenderGenerationConfig() - { - return $this->recommender_generation_config; - } - - public function hasRecommenderGenerationConfig() - { - return isset($this->recommender_generation_config); - } - - public function clearRecommenderGenerationConfig() - { - unset($this->recommender_generation_config); - } - - /** - * RecommenderGenerationConfig which configures the Generation of - * recommendations for this recommender. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderGenerationConfig recommender_generation_config = 2; - * @param \Google\Cloud\Recommender\V1\RecommenderGenerationConfig $var - * @return $this - */ - public function setRecommenderGenerationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommenderGenerationConfig::class); - $this->recommender_generation_config = $var; - - return $this; - } - - /** - * Fingerprint of the RecommenderConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Fingerprint of the RecommenderConfig. Provides optimistic locking when - * updating. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last time when the config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. Immutable. The revision ID of the config. - * A new revision is committed whenever the config is changed in any way. - * The format is an 8-character hexadecimal string. - * - * Generated from protobuf field string revision_id = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Allows clients to store small amounts of arbitrary data. Annotations must - * follow the Kubernetes syntax. - * The total size of all keys and values combined is limited to 256k. - * Key can have 2 segments: prefix (optional) and name (required), - * separated by a slash (/). - * Prefix must be a DNS subdomain. - * Name must be 63 characters or less, begin and end with alphanumerics, - * with dashes (-), underscores (_), dots (.), and alphanumerics between. - * - * Generated from protobuf field map annotations = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user-settable field to provide a human-readable name to be used in user - * interfaces. - * - * Generated from protobuf field string display_name = 7; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php deleted file mode 100644 index 61338b71a7e5..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/RecommenderGenerationConfig.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.recommender.v1.RecommenderGenerationConfig - */ -class RecommenderGenerationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters for this RecommenderGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - */ - protected $params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $params - * Parameters for this RecommenderGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderConfig::initOnce(); - parent::__construct($data); - } - - /** - * Parameters for this RecommenderGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getParams() - { - return $this->params; - } - - public function hasParams() - { - return isset($this->params); - } - - public function clearParams() - { - unset($this->params); - } - - /** - * Parameters for this RecommenderGenerationConfig. These configs can be used - * by or are applied to all subtypes. - * - * Generated from protobuf field .google.protobuf.Struct params = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setParams($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php deleted file mode 100644 index 53a441676894..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.recommender.v1.ReliabilityProjection - */ -class ReliabilityProjection extends \Google\Protobuf\Internal\Message -{ - /** - * Reliability risks mitigated by this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; - */ - private $risks; - /** - * Per-recommender projection. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - */ - protected $details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int[] $risks - * Reliability risks mitigated by this recommendation. - * @type \Google\Protobuf\Struct $details - * Per-recommender projection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Reliability risks mitigated by this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; - * @return RepeatedField - */ - public function getRisks() - { - return $this->risks; - } - - /** - * Reliability risks mitigated by this recommendation. - * - * Generated from protobuf field repeated .google.cloud.recommender.v1.ReliabilityProjection.RiskType risks = 1; - * @param int[] $var - * @return $this - */ - public function setRisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Recommender\V1\ReliabilityProjection\RiskType::class); - $this->risks = $arr; - - return $this; - } - - /** - * Per-recommender projection. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getDetails() - { - return $this->details; - } - - public function hasDetails() - { - return isset($this->details); - } - - public function clearDetails() - { - unset($this->details); - } - - /** - * Per-recommender projection. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php deleted file mode 100644 index be85f388417a..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ReliabilityProjection/RiskType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.recommender.v1.ReliabilityProjection.RiskType - */ -class RiskType -{ - /** - * Default unspecified risk. Don't use directly. - * - * Generated from protobuf enum RISK_TYPE_UNSPECIFIED = 0; - */ - const RISK_TYPE_UNSPECIFIED = 0; - /** - * Potential service downtime. - * - * Generated from protobuf enum SERVICE_DISRUPTION = 1; - */ - const SERVICE_DISRUPTION = 1; - /** - * Potential data loss. - * - * Generated from protobuf enum DATA_LOSS = 2; - */ - const DATA_LOSS = 2; - /** - * Potential access denial. The service is still up but some or all clients - * can't access it. - * - * Generated from protobuf enum ACCESS_DENY = 3; - */ - const ACCESS_DENY = 3; - - private static $valueToName = [ - self::RISK_TYPE_UNSPECIFIED => 'RISK_TYPE_UNSPECIFIED', - self::SERVICE_DISRUPTION => 'SERVICE_DISRUPTION', - self::DATA_LOSS => 'DATA_LOSS', - self::ACCESS_DENY => 'ACCESS_DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php deleted file mode 100644 index a41ea471c7a4..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SecurityProjection.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.recommender.v1.SecurityProjection - */ -class SecurityProjection extends \Google\Protobuf\Internal\Message -{ - /** - * Additional security impact details that is provided by the recommender. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - */ - protected $details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $details - * Additional security impact details that is provided by the recommender. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Additional security impact details that is provided by the recommender. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getDetails() - { - return $this->details; - } - - public function hasDetails() - { - return isset($this->details); - } - - public function clearDetails() - { - unset($this->details); - } - - /** - * Additional security impact details that is provided by the recommender. - * - * Generated from protobuf field .google.protobuf.Struct details = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php deleted file mode 100644 index 66bc39171c61..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/SustainabilityProjection.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.recommender.v1.SustainabilityProjection - */ -class SustainabilityProjection extends \Google\Protobuf\Internal\Message -{ - /** - * Carbon Footprint generated in kg of CO2 equivalent. - * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). - * - * Generated from protobuf field double kg_c_o2e = 1; - */ - protected $kg_c_o2e = 0.0; - /** - * Duration for which this sustainability applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $kg_c_o2e - * Carbon Footprint generated in kg of CO2 equivalent. - * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). - * @type \Google\Protobuf\Duration $duration - * Duration for which this sustainability applies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * Carbon Footprint generated in kg of CO2 equivalent. - * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). - * - * Generated from protobuf field double kg_c_o2e = 1; - * @return float - */ - public function getKgCO2E() - { - return $this->kg_c_o2e; - } - - /** - * Carbon Footprint generated in kg of CO2 equivalent. - * Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e). - * - * Generated from protobuf field double kg_c_o2e = 1; - * @param float $var - * @return $this - */ - public function setKgCO2E($var) - { - GPBUtil::checkDouble($var); - $this->kg_c_o2e = $var; - - return $this; - } - - /** - * Duration for which this sustainability applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration for which this sustainability applies. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php deleted file mode 100644 index e95f6c77f1b5..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateInsightTypeConfigRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.recommender.v1.UpdateInsightTypeConfigRequest - */ -class UpdateInsightTypeConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The InsightTypeConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $insight_type_config = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Recommender\V1\InsightTypeConfig $insightTypeConfig Required. The InsightTypeConfig to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Recommender\V1\UpdateInsightTypeConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Recommender\V1\InsightTypeConfig $insightTypeConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInsightTypeConfig($insightTypeConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\InsightTypeConfig $insight_type_config - * Required. The InsightTypeConfig to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * @type bool $validate_only - * If true, validate the request and preview the change, but do not actually - * update it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The InsightTypeConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Recommender\V1\InsightTypeConfig|null - */ - public function getInsightTypeConfig() - { - return $this->insight_type_config; - } - - public function hasInsightTypeConfig() - { - return isset($this->insight_type_config); - } - - public function clearInsightTypeConfig() - { - unset($this->insight_type_config); - } - - /** - * Required. The InsightTypeConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.InsightTypeConfig insight_type_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Recommender\V1\InsightTypeConfig $var - * @return $this - */ - public function setInsightTypeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\InsightTypeConfig::class); - $this->insight_type_config = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php deleted file mode 100644 index 630f76c5db09..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/UpdateRecommenderConfigRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.recommender.v1.UpdateRecommenderConfigRequest - */ -class UpdateRecommenderConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The RecommenderConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $recommender_config = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Recommender\V1\RecommenderConfig $recommenderConfig Required. The RecommenderConfig to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Recommender\V1\UpdateRecommenderConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Recommender\V1\RecommenderConfig $recommenderConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRecommenderConfig($recommenderConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Recommender\V1\RecommenderConfig $recommender_config - * Required. The RecommenderConfig to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * @type bool $validate_only - * If true, validate the request and preview the change, but do not actually - * update it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The RecommenderConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Recommender\V1\RecommenderConfig|null - */ - public function getRecommenderConfig() - { - return $this->recommender_config; - } - - public function hasRecommenderConfig() - { - return isset($this->recommender_config); - } - - public function clearRecommenderConfig() - { - unset($this->recommender_config); - } - - /** - * Required. The RecommenderConfig to update. - * - * Generated from protobuf field .google.cloud.recommender.v1.RecommenderConfig recommender_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Recommender\V1\RecommenderConfig $var - * @return $this - */ - public function setRecommenderConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Recommender\V1\RecommenderConfig::class); - $this->recommender_config = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If true, validate the request and preview the change, but do not actually - * update it. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php b/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php deleted file mode 100644 index 6a14eada8bb4..000000000000 --- a/owl-bot-staging/Recommender/v1/proto/src/Google/Cloud/Recommender/V1/ValueMatcher.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.recommender.v1.ValueMatcher - */ -class ValueMatcher extends \Google\Protobuf\Internal\Message -{ - protected $match_variant; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $matches_pattern - * 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 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce(); - parent::__construct($data); - } - - /** - * 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 - * - * Generated from protobuf field string matches_pattern = 1; - * @return string - */ - public function getMatchesPattern() - { - return $this->readOneof(1); - } - - public function hasMatchesPattern() - { - return $this->hasOneof(1); - } - - /** - * 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 - * - * Generated from protobuf field string matches_pattern = 1; - * @param string $var - * @return $this - */ - public function setMatchesPattern($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getMatchVariant() - { - return $this->whichOneof("match_variant"); - } - -} - diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php deleted file mode 100644 index 92e051a5b9de..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Insight $response */ - $response = $recommenderClient->getInsight($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::insightName( - '[PROJECT]', - '[LOCATION]', - '[INSIGHT_TYPE]', - '[INSIGHT]' - ); - - get_insight_sample($formattedName); -} -// [END recommender_v1_generated_Recommender_GetInsight_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php deleted file mode 100644 index a0716a43e20a..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_insight_type_config.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var InsightTypeConfig $response */ - $response = $recommenderClient->getInsightTypeConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::insightTypeConfigName( - '[PROJECT]', - '[LOCATION]', - '[INSIGHT_TYPE]' - ); - - get_insight_type_config_sample($formattedName); -} -// [END recommender_v1_generated_Recommender_GetInsightTypeConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php deleted file mode 100644 index 9c626708f452..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommendation.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Recommendation $response */ - $response = $recommenderClient->getRecommendation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommendationName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]', - '[RECOMMENDATION]' - ); - - get_recommendation_sample($formattedName); -} -// [END recommender_v1_generated_Recommender_GetRecommendation_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php deleted file mode 100644 index 7bdc82c63f8b..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/get_recommender_config.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RecommenderConfig $response */ - $response = $recommenderClient->getRecommenderConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommenderConfigName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]' - ); - - get_recommender_config_sample($formattedName); -} -// [END recommender_v1_generated_Recommender_GetRecommenderConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php deleted file mode 100644 index b111a0bfa576..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_insights.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recommenderClient->listInsights($request); - - /** @var Insight $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = RecommenderClient::insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); - - list_insights_sample($formattedParent); -} -// [END recommender_v1_generated_Recommender_ListInsights_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php deleted file mode 100644 index 83af7cf37aa2..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/list_recommendations.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $recommenderClient->listRecommendations($request); - - /** @var Recommendation $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = RecommenderClient::recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); - - list_recommendations_sample($formattedParent); -} -// [END recommender_v1_generated_Recommender_ListRecommendations_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php deleted file mode 100644 index e3ed8e2d68b9..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_insight_accepted.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var Insight $response */ - $response = $recommenderClient->markInsightAccepted($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::insightName( - '[PROJECT]', - '[LOCATION]', - '[INSIGHT_TYPE]', - '[INSIGHT]' - ); - $etag = '[ETAG]'; - - mark_insight_accepted_sample($formattedName, $etag); -} -// [END recommender_v1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php deleted file mode 100644 index ea094fe5d442..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_claimed.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var Recommendation $response */ - $response = $recommenderClient->markRecommendationClaimed($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommendationName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]', - '[RECOMMENDATION]' - ); - $etag = '[ETAG]'; - - mark_recommendation_claimed_sample($formattedName, $etag); -} -// [END recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php deleted file mode 100644 index 20c60f651574..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_dismissed.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Recommendation $response */ - $response = $recommenderClient->markRecommendationDismissed($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommendationName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]', - '[RECOMMENDATION]' - ); - - mark_recommendation_dismissed_sample($formattedName); -} -// [END recommender_v1_generated_Recommender_MarkRecommendationDismissed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php deleted file mode 100644 index 0cfa4b30d2e0..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_failed.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var Recommendation $response */ - $response = $recommenderClient->markRecommendationFailed($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommendationName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]', - '[RECOMMENDATION]' - ); - $etag = '[ETAG]'; - - mark_recommendation_failed_sample($formattedName, $etag); -} -// [END recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php deleted file mode 100644 index 886783151678..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/mark_recommendation_succeeded.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName) - ->setEtag($etag); - - // Call the API and handle any network failures. - try { - /** @var Recommendation $response */ - $response = $recommenderClient->markRecommendationSucceeded($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = RecommenderClient::recommendationName( - '[PROJECT]', - '[LOCATION]', - '[RECOMMENDER]', - '[RECOMMENDATION]' - ); - $etag = '[ETAG]'; - - mark_recommendation_succeeded_sample($formattedName, $etag); -} -// [END recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php deleted file mode 100644 index 67d4e6aec5b3..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_insight_type_config.php +++ /dev/null @@ -1,60 +0,0 @@ -setInsightTypeConfig($insightTypeConfig); - - // Call the API and handle any network failures. - try { - /** @var InsightTypeConfig $response */ - $response = $recommenderClient->updateInsightTypeConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END recommender_v1_generated_Recommender_UpdateInsightTypeConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php b/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php deleted file mode 100644 index e3ca4744d587..000000000000 --- a/owl-bot-staging/Recommender/v1/samples/V1/RecommenderClient/update_recommender_config.php +++ /dev/null @@ -1,60 +0,0 @@ -setRecommenderConfig($recommenderConfig); - - // Call the API and handle any network failures. - try { - /** @var RecommenderConfig $response */ - $response = $recommenderClient->updateRecommenderConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END recommender_v1_generated_Recommender_UpdateRecommenderConfig_sync] diff --git a/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php b/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php deleted file mode 100644 index 17b0835a1eb6..000000000000 --- a/owl-bot-staging/Recommender/v1/src/V1/Client/RecommenderClient.php +++ /dev/null @@ -1,1211 +0,0 @@ - getInsightAsync(GetInsightRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInsightTypeConfigAsync(GetInsightTypeConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRecommendationAsync(GetRecommendationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRecommenderConfigAsync(GetRecommenderConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInsightsAsync(ListInsightsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRecommendationsAsync(ListRecommendationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface markInsightAcceptedAsync(MarkInsightAcceptedRequest $request, array $optionalArgs = []) - * @method PromiseInterface markRecommendationClaimedAsync(MarkRecommendationClaimedRequest $request, array $optionalArgs = []) - * @method PromiseInterface markRecommendationDismissedAsync(MarkRecommendationDismissedRequest $request, array $optionalArgs = []) - * @method PromiseInterface markRecommendationFailedAsync(MarkRecommendationFailedRequest $request, array $optionalArgs = []) - * @method PromiseInterface markRecommendationSucceededAsync(MarkRecommendationSucceededRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInsightTypeConfigAsync(UpdateInsightTypeConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRecommenderConfigAsync(UpdateRecommenderConfigRequest $request, array $optionalArgs = []) - */ -final class RecommenderClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.recommender.v1.Recommender'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'recommender.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'recommender.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/recommender_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/recommender_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/recommender_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/recommender_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_insight_type resource. - * - * @param string $billingAccount - * @param string $location - * @param string $insightType - * - * @return string The formatted billing_account_location_insight_type resource. - */ - public static function billingAccountLocationInsightTypeName(string $billingAccount, string $location, string $insightType): string - { - return self::getPathTemplate('billingAccountLocationInsightType')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_insight_type_config resource. - * - * @param string $billingAccount - * @param string $location - * @param string $insightType - * - * @return string The formatted billing_account_location_insight_type_config resource. - */ - public static function billingAccountLocationInsightTypeConfigName(string $billingAccount, string $location, string $insightType): string - { - return self::getPathTemplate('billingAccountLocationInsightTypeConfig')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_insight_type_insight resource. - * - * @param string $billingAccount - * @param string $location - * @param string $insightType - * @param string $insight - * - * @return string The formatted billing_account_location_insight_type_insight resource. - */ - public static function billingAccountLocationInsightTypeInsightName(string $billingAccount, string $location, string $insightType, string $insight): string - { - return self::getPathTemplate('billingAccountLocationInsightTypeInsight')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'insight_type' => $insightType, - 'insight' => $insight, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_recommender resource. - * - * @param string $billingAccount - * @param string $location - * @param string $recommender - * - * @return string The formatted billing_account_location_recommender resource. - */ - public static function billingAccountLocationRecommenderName(string $billingAccount, string $location, string $recommender): string - { - return self::getPathTemplate('billingAccountLocationRecommender')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_recommender_config resource. - * - * @param string $billingAccount - * @param string $location - * @param string $recommender - * - * @return string The formatted billing_account_location_recommender_config resource. - */ - public static function billingAccountLocationRecommenderConfigName(string $billingAccount, string $location, string $recommender): string - { - return self::getPathTemplate('billingAccountLocationRecommenderConfig')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_recommender_recommendation resource. - * - * @param string $billingAccount - * @param string $location - * @param string $recommender - * @param string $recommendation - * - * @return string The formatted billing_account_location_recommender_recommendation resource. - */ - public static function billingAccountLocationRecommenderRecommendationName(string $billingAccount, string $location, string $recommender, string $recommendation): string - { - return self::getPathTemplate('billingAccountLocationRecommenderRecommendation')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'recommender' => $recommender, - 'recommendation' => $recommendation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_insight_type resource. - * - * @param string $folder - * @param string $location - * @param string $insightType - * - * @return string The formatted folder_location_insight_type resource. - */ - public static function folderLocationInsightTypeName(string $folder, string $location, string $insightType): string - { - return self::getPathTemplate('folderLocationInsightType')->render([ - 'folder' => $folder, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_insight_type_insight resource. - * - * @param string $folder - * @param string $location - * @param string $insightType - * @param string $insight - * - * @return string The formatted folder_location_insight_type_insight resource. - */ - public static function folderLocationInsightTypeInsightName(string $folder, string $location, string $insightType, string $insight): string - { - return self::getPathTemplate('folderLocationInsightTypeInsight')->render([ - 'folder' => $folder, - 'location' => $location, - 'insight_type' => $insightType, - 'insight' => $insight, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_recommender resource. - * - * @param string $folder - * @param string $location - * @param string $recommender - * - * @return string The formatted folder_location_recommender resource. - */ - public static function folderLocationRecommenderName(string $folder, string $location, string $recommender): string - { - return self::getPathTemplate('folderLocationRecommender')->render([ - 'folder' => $folder, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_recommender_recommendation resource. - * - * @param string $folder - * @param string $location - * @param string $recommender - * @param string $recommendation - * - * @return string The formatted folder_location_recommender_recommendation resource. - */ - public static function folderLocationRecommenderRecommendationName(string $folder, string $location, string $recommender, string $recommendation): string - { - return self::getPathTemplate('folderLocationRecommenderRecommendation')->render([ - 'folder' => $folder, - 'location' => $location, - 'recommender' => $recommender, - 'recommendation' => $recommendation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a insight - * resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * @param string $insight - * - * @return string The formatted insight resource. - */ - public static function insightName(string $project, string $location, string $insightType, string $insight): string - { - return self::getPathTemplate('insight')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - 'insight' => $insight, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a insight_type - * resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * - * @return string The formatted insight_type resource. - */ - public static function insightTypeName(string $project, string $location, string $insightType): string - { - return self::getPathTemplate('insightType')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * insight_type_config resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * - * @return string The formatted insight_type_config resource. - */ - public static function insightTypeConfigName(string $project, string $location, string $insightType): string - { - return self::getPathTemplate('insightTypeConfig')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_insight_type resource. - * - * @param string $organization - * @param string $location - * @param string $insightType - * - * @return string The formatted organization_location_insight_type resource. - */ - public static function organizationLocationInsightTypeName(string $organization, string $location, string $insightType): string - { - return self::getPathTemplate('organizationLocationInsightType')->render([ - 'organization' => $organization, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_insight_type_config resource. - * - * @param string $organization - * @param string $location - * @param string $insightType - * - * @return string The formatted organization_location_insight_type_config resource. - */ - public static function organizationLocationInsightTypeConfigName(string $organization, string $location, string $insightType): string - { - return self::getPathTemplate('organizationLocationInsightTypeConfig')->render([ - 'organization' => $organization, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_insight_type_insight resource. - * - * @param string $organization - * @param string $location - * @param string $insightType - * @param string $insight - * - * @return string The formatted organization_location_insight_type_insight resource. - */ - public static function organizationLocationInsightTypeInsightName(string $organization, string $location, string $insightType, string $insight): string - { - return self::getPathTemplate('organizationLocationInsightTypeInsight')->render([ - 'organization' => $organization, - 'location' => $location, - 'insight_type' => $insightType, - 'insight' => $insight, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_recommender resource. - * - * @param string $organization - * @param string $location - * @param string $recommender - * - * @return string The formatted organization_location_recommender resource. - */ - public static function organizationLocationRecommenderName(string $organization, string $location, string $recommender): string - { - return self::getPathTemplate('organizationLocationRecommender')->render([ - 'organization' => $organization, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_recommender_config resource. - * - * @param string $organization - * @param string $location - * @param string $recommender - * - * @return string The formatted organization_location_recommender_config resource. - */ - public static function organizationLocationRecommenderConfigName(string $organization, string $location, string $recommender): string - { - return self::getPathTemplate('organizationLocationRecommenderConfig')->render([ - 'organization' => $organization, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_recommender_recommendation resource. - * - * @param string $organization - * @param string $location - * @param string $recommender - * @param string $recommendation - * - * @return string The formatted organization_location_recommender_recommendation resource. - */ - public static function organizationLocationRecommenderRecommendationName(string $organization, string $location, string $recommender, string $recommendation): string - { - return self::getPathTemplate('organizationLocationRecommenderRecommendation')->render([ - 'organization' => $organization, - 'location' => $location, - 'recommender' => $recommender, - 'recommendation' => $recommendation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_insight_type resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * - * @return string The formatted project_location_insight_type resource. - */ - public static function projectLocationInsightTypeName(string $project, string $location, string $insightType): string - { - return self::getPathTemplate('projectLocationInsightType')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_insight_type_config resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * - * @return string The formatted project_location_insight_type_config resource. - */ - public static function projectLocationInsightTypeConfigName(string $project, string $location, string $insightType): string - { - return self::getPathTemplate('projectLocationInsightTypeConfig')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_insight_type_insight resource. - * - * @param string $project - * @param string $location - * @param string $insightType - * @param string $insight - * - * @return string The formatted project_location_insight_type_insight resource. - */ - public static function projectLocationInsightTypeInsightName(string $project, string $location, string $insightType, string $insight): string - { - return self::getPathTemplate('projectLocationInsightTypeInsight')->render([ - 'project' => $project, - 'location' => $location, - 'insight_type' => $insightType, - 'insight' => $insight, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_recommender resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * - * @return string The formatted project_location_recommender resource. - */ - public static function projectLocationRecommenderName(string $project, string $location, string $recommender): string - { - return self::getPathTemplate('projectLocationRecommender')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_recommender_config resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * - * @return string The formatted project_location_recommender_config resource. - */ - public static function projectLocationRecommenderConfigName(string $project, string $location, string $recommender): string - { - return self::getPathTemplate('projectLocationRecommenderConfig')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_recommender_recommendation resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * @param string $recommendation - * - * @return string The formatted project_location_recommender_recommendation resource. - */ - public static function projectLocationRecommenderRecommendationName(string $project, string $location, string $recommender, string $recommendation): string - { - return self::getPathTemplate('projectLocationRecommenderRecommendation')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - 'recommendation' => $recommendation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * recommendation resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * @param string $recommendation - * - * @return string The formatted recommendation resource. - */ - public static function recommendationName(string $project, string $location, string $recommender, string $recommendation): string - { - return self::getPathTemplate('recommendation')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - 'recommendation' => $recommendation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a recommender - * resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * - * @return string The formatted recommender resource. - */ - public static function recommenderName(string $project, string $location, string $recommender): string - { - return self::getPathTemplate('recommender')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * recommender_config resource. - * - * @param string $project - * @param string $location - * @param string $recommender - * - * @return string The formatted recommender_config resource. - */ - public static function recommenderConfigName(string $project, string $location, string $recommender): string - { - return self::getPathTemplate('recommenderConfig')->render([ - 'project' => $project, - 'location' => $location, - 'recommender' => $recommender, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccountLocationInsightType: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type} - * - billingAccountLocationInsightTypeConfig: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config - * - billingAccountLocationInsightTypeInsight: billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight} - * - billingAccountLocationRecommender: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender} - * - billingAccountLocationRecommenderConfig: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config - * - billingAccountLocationRecommenderRecommendation: billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - * - folderLocationInsightType: folders/{folder}/locations/{location}/insightTypes/{insight_type} - * - folderLocationInsightTypeInsight: folders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight} - * - folderLocationRecommender: folders/{folder}/locations/{location}/recommenders/{recommender} - * - folderLocationRecommenderRecommendation: folders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - * - insight: projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight} - * - insightType: projects/{project}/locations/{location}/insightTypes/{insight_type} - * - insightTypeConfig: projects/{project}/locations/{location}/insightTypes/{insight_type}/config - * - organizationLocationInsightType: organizations/{organization}/locations/{location}/insightTypes/{insight_type} - * - organizationLocationInsightTypeConfig: organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config - * - organizationLocationInsightTypeInsight: organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight} - * - organizationLocationRecommender: organizations/{organization}/locations/{location}/recommenders/{recommender} - * - organizationLocationRecommenderConfig: organizations/{organization}/locations/{location}/recommenders/{recommender}/config - * - organizationLocationRecommenderRecommendation: organizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - * - projectLocationInsightType: projects/{project}/locations/{location}/insightTypes/{insight_type} - * - projectLocationInsightTypeConfig: projects/{project}/locations/{location}/insightTypes/{insight_type}/config - * - projectLocationInsightTypeInsight: projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight} - * - projectLocationRecommender: projects/{project}/locations/{location}/recommenders/{recommender} - * - projectLocationRecommenderConfig: projects/{project}/locations/{location}/recommenders/{recommender}/config - * - projectLocationRecommenderRecommendation: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - * - recommendation: projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation} - * - recommender: projects/{project}/locations/{location}/recommenders/{recommender} - * - recommenderConfig: projects/{project}/locations/{location}/recommenders/{recommender}/config - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'recommender.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Recommender\V1\RecommenderClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new RecommenderClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Gets the requested insight. Requires the recommender.*.get IAM permission - * for the specified insight type. - * - * The async variant is {@see RecommenderClient::getInsightAsync()} . - * - * @example samples/V1/RecommenderClient/get_insight.php - * - * @param GetInsightRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Insight - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInsight(GetInsightRequest $request, array $callOptions = []): Insight - { - return $this->startApiCall('GetInsight', $request, $callOptions)->wait(); - } - - /** - * Gets the requested InsightTypeConfig. There is only one instance of the - * config for each InsightType. - * - * The async variant is {@see RecommenderClient::getInsightTypeConfigAsync()} . - * - * @example samples/V1/RecommenderClient/get_insight_type_config.php - * - * @param GetInsightTypeConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return InsightTypeConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInsightTypeConfig(GetInsightTypeConfigRequest $request, array $callOptions = []): InsightTypeConfig - { - return $this->startApiCall('GetInsightTypeConfig', $request, $callOptions)->wait(); - } - - /** - * Gets the requested recommendation. Requires the recommender.*.get - * IAM permission for the specified recommender. - * - * The async variant is {@see RecommenderClient::getRecommendationAsync()} . - * - * @example samples/V1/RecommenderClient/get_recommendation.php - * - * @param GetRecommendationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Recommendation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRecommendation(GetRecommendationRequest $request, array $callOptions = []): Recommendation - { - return $this->startApiCall('GetRecommendation', $request, $callOptions)->wait(); - } - - /** - * Gets the requested Recommender Config. There is only one instance of the - * config for each Recommender. - * - * The async variant is {@see RecommenderClient::getRecommenderConfigAsync()} . - * - * @example samples/V1/RecommenderClient/get_recommender_config.php - * - * @param GetRecommenderConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RecommenderConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRecommenderConfig(GetRecommenderConfigRequest $request, array $callOptions = []): RecommenderConfig - { - return $this->startApiCall('GetRecommenderConfig', $request, $callOptions)->wait(); - } - - /** - * Lists insights for the specified Cloud Resource. Requires the - * recommender.*.list IAM permission for the specified insight type. - * - * The async variant is {@see RecommenderClient::listInsightsAsync()} . - * - * @example samples/V1/RecommenderClient/list_insights.php - * - * @param ListInsightsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInsights(ListInsightsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInsights', $request, $callOptions); - } - - /** - * Lists recommendations for the specified Cloud Resource. Requires the - * recommender.*.list IAM permission for the specified recommender. - * - * The async variant is {@see RecommenderClient::listRecommendationsAsync()} . - * - * @example samples/V1/RecommenderClient/list_recommendations.php - * - * @param ListRecommendationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRecommendations(ListRecommendationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRecommendations', $request, $callOptions); - } - - /** - * Marks the Insight State as Accepted. Users can use this method to - * indicate to the Recommender API that they have applied some action based - * on the insight. This stops the insight content from being updated. - * - * MarkInsightAccepted can be applied to insights in ACTIVE state. Requires - * the recommender.*.update IAM permission for the specified insight. - * - * The async variant is {@see RecommenderClient::markInsightAcceptedAsync()} . - * - * @example samples/V1/RecommenderClient/mark_insight_accepted.php - * - * @param MarkInsightAcceptedRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Insight - * - * @throws ApiException Thrown if the API call fails. - */ - public function markInsightAccepted(MarkInsightAcceptedRequest $request, array $callOptions = []): Insight - { - return $this->startApiCall('MarkInsightAccepted', $request, $callOptions)->wait(); - } - - /** - * Marks the Recommendation State as Claimed. Users can use this method to - * indicate to the Recommender API that they are starting to apply the - * recommendation themselves. This stops the recommendation content from being - * updated. Associated insights are frozen and placed in the ACCEPTED state. - * - * MarkRecommendationClaimed can be applied to recommendations in CLAIMED, - * SUCCEEDED, FAILED, or ACTIVE state. - * - * Requires the recommender.*.update IAM permission for the specified - * recommender. - * - * The async variant is {@see RecommenderClient::markRecommendationClaimedAsync()} - * . - * - * @example samples/V1/RecommenderClient/mark_recommendation_claimed.php - * - * @param MarkRecommendationClaimedRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Recommendation - * - * @throws ApiException Thrown if the API call fails. - */ - public function markRecommendationClaimed(MarkRecommendationClaimedRequest $request, array $callOptions = []): Recommendation - { - return $this->startApiCall('MarkRecommendationClaimed', $request, $callOptions)->wait(); - } - - /** - * Mark the Recommendation State as Dismissed. Users can use this method to - * indicate to the Recommender API that an ACTIVE recommendation has to - * be marked back as DISMISSED. - * - * MarkRecommendationDismissed can be applied to recommendations in ACTIVE - * state. - * - * Requires the recommender.*.update IAM permission for the specified - * recommender. - * - * The async variant is - * {@see RecommenderClient::markRecommendationDismissedAsync()} . - * - * @example samples/V1/RecommenderClient/mark_recommendation_dismissed.php - * - * @param MarkRecommendationDismissedRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Recommendation - * - * @throws ApiException Thrown if the API call fails. - */ - public function markRecommendationDismissed(MarkRecommendationDismissedRequest $request, array $callOptions = []): Recommendation - { - return $this->startApiCall('MarkRecommendationDismissed', $request, $callOptions)->wait(); - } - - /** - * Marks the Recommendation State as Failed. Users can use this method to - * indicate to the Recommender API that they have applied the recommendation - * themselves, and the operation failed. This stops the recommendation content - * from being updated. Associated insights are frozen and placed in the - * ACCEPTED state. - * - * MarkRecommendationFailed can be applied to recommendations in ACTIVE, - * CLAIMED, SUCCEEDED, or FAILED state. - * - * Requires the recommender.*.update IAM permission for the specified - * recommender. - * - * The async variant is {@see RecommenderClient::markRecommendationFailedAsync()} . - * - * @example samples/V1/RecommenderClient/mark_recommendation_failed.php - * - * @param MarkRecommendationFailedRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Recommendation - * - * @throws ApiException Thrown if the API call fails. - */ - public function markRecommendationFailed(MarkRecommendationFailedRequest $request, array $callOptions = []): Recommendation - { - return $this->startApiCall('MarkRecommendationFailed', $request, $callOptions)->wait(); - } - - /** - * Marks the Recommendation State as Succeeded. Users can use this method to - * indicate to the Recommender API that they have applied the recommendation - * themselves, and the operation was successful. This stops the recommendation - * content from being updated. Associated insights are frozen and placed in - * the ACCEPTED state. - * - * MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, - * CLAIMED, SUCCEEDED, or FAILED state. - * - * Requires the recommender.*.update IAM permission for the specified - * recommender. - * - * The async variant is - * {@see RecommenderClient::markRecommendationSucceededAsync()} . - * - * @example samples/V1/RecommenderClient/mark_recommendation_succeeded.php - * - * @param MarkRecommendationSucceededRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Recommendation - * - * @throws ApiException Thrown if the API call fails. - */ - public function markRecommendationSucceeded(MarkRecommendationSucceededRequest $request, array $callOptions = []): Recommendation - { - return $this->startApiCall('MarkRecommendationSucceeded', $request, $callOptions)->wait(); - } - - /** - * Updates an InsightTypeConfig change. This will create a new revision of the - * config. - * - * The async variant is {@see RecommenderClient::updateInsightTypeConfigAsync()} . - * - * @example samples/V1/RecommenderClient/update_insight_type_config.php - * - * @param UpdateInsightTypeConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return InsightTypeConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInsightTypeConfig(UpdateInsightTypeConfigRequest $request, array $callOptions = []): InsightTypeConfig - { - return $this->startApiCall('UpdateInsightTypeConfig', $request, $callOptions)->wait(); - } - - /** - * Updates a Recommender Config. This will create a new revision of the - * config. - * - * The async variant is {@see RecommenderClient::updateRecommenderConfigAsync()} . - * - * @example samples/V1/RecommenderClient/update_recommender_config.php - * - * @param UpdateRecommenderConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RecommenderConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateRecommenderConfig(UpdateRecommenderConfigRequest $request, array $callOptions = []): RecommenderConfig - { - return $this->startApiCall('UpdateRecommenderConfig', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 61d8a5fabcf4..000000000000 --- a/owl-bot-staging/Recommender/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.recommender.v1", - "libraryPackage": "Google\\Cloud\\Recommender\\V1", - "services": { - "Recommender": { - "clients": { - "grpc": { - "libraryClient": "RecommenderGapicClient", - "rpcs": { - "GetInsight": { - "methods": [ - "getInsight" - ] - }, - "GetInsightTypeConfig": { - "methods": [ - "getInsightTypeConfig" - ] - }, - "GetRecommendation": { - "methods": [ - "getRecommendation" - ] - }, - "GetRecommenderConfig": { - "methods": [ - "getRecommenderConfig" - ] - }, - "ListInsights": { - "methods": [ - "listInsights" - ] - }, - "ListRecommendations": { - "methods": [ - "listRecommendations" - ] - }, - "MarkInsightAccepted": { - "methods": [ - "markInsightAccepted" - ] - }, - "MarkRecommendationClaimed": { - "methods": [ - "markRecommendationClaimed" - ] - }, - "MarkRecommendationDismissed": { - "methods": [ - "markRecommendationDismissed" - ] - }, - "MarkRecommendationFailed": { - "methods": [ - "markRecommendationFailed" - ] - }, - "MarkRecommendationSucceeded": { - "methods": [ - "markRecommendationSucceeded" - ] - }, - "UpdateInsightTypeConfig": { - "methods": [ - "updateInsightTypeConfig" - ] - }, - "UpdateRecommenderConfig": { - "methods": [ - "updateRecommenderConfig" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json deleted file mode 100644 index 4b79a146a7c0..000000000000 --- a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_client_config.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "interfaces": { - "google.cloud.recommender.v1.Recommender": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "GetInsight": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInsightTypeConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetRecommendation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRecommenderConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInsights": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRecommendations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MarkInsightAccepted": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "MarkRecommendationClaimed": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "MarkRecommendationDismissed": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "MarkRecommendationFailed": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "MarkRecommendationSucceeded": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInsightTypeConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateRecommenderConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php deleted file mode 100644 index 317b091eff87..000000000000 --- a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_descriptor_config.php +++ /dev/null @@ -1,232 +0,0 @@ - [ - 'google.cloud.recommender.v1.Recommender' => [ - 'GetInsight' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Insight', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInsightTypeConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\InsightTypeConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRecommendation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRecommenderConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\RecommenderConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInsights' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInsights', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\ListInsightsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRecommendations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRecommendations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\ListRecommendationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'MarkInsightAccepted' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Insight', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationClaimed' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationDismissed' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationFailed' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationSucceeded' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\Recommendation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInsightTypeConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\InsightTypeConfig', - 'headerParams' => [ - [ - 'keyName' => 'insight_type_config.name', - 'fieldAccessors' => [ - 'getInsightTypeConfig', - 'getName', - ], - ], - ], - ], - 'UpdateRecommenderConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Recommender\V1\RecommenderConfig', - 'headerParams' => [ - [ - 'keyName' => 'recommender_config.name', - 'fieldAccessors' => [ - 'getRecommenderConfig', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'billingAccountLocationInsightType' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}', - 'billingAccountLocationInsightTypeConfig' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/config', - 'billingAccountLocationInsightTypeInsight' => 'billingAccounts/{billing_account}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', - 'billingAccountLocationRecommender' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}', - 'billingAccountLocationRecommenderConfig' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/config', - 'billingAccountLocationRecommenderRecommendation' => 'billingAccounts/{billing_account}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', - 'folderLocationInsightType' => 'folders/{folder}/locations/{location}/insightTypes/{insight_type}', - 'folderLocationInsightTypeInsight' => 'folders/{folder}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', - 'folderLocationRecommender' => 'folders/{folder}/locations/{location}/recommenders/{recommender}', - 'folderLocationRecommenderRecommendation' => 'folders/{folder}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', - 'insight' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', - 'insightType' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}', - 'insightTypeConfig' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/config', - 'organizationLocationInsightType' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}', - 'organizationLocationInsightTypeConfig' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config', - 'organizationLocationInsightTypeInsight' => 'organizations/{organization}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', - 'organizationLocationRecommender' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}', - 'organizationLocationRecommenderConfig' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}/config', - 'organizationLocationRecommenderRecommendation' => 'organizations/{organization}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', - 'projectLocationInsightType' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}', - 'projectLocationInsightTypeConfig' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/config', - 'projectLocationInsightTypeInsight' => 'projects/{project}/locations/{location}/insightTypes/{insight_type}/insights/{insight}', - 'projectLocationRecommender' => 'projects/{project}/locations/{location}/recommenders/{recommender}', - 'projectLocationRecommenderConfig' => 'projects/{project}/locations/{location}/recommenders/{recommender}/config', - 'projectLocationRecommenderRecommendation' => 'projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', - 'recommendation' => 'projects/{project}/locations/{location}/recommenders/{recommender}/recommendations/{recommendation}', - 'recommender' => 'projects/{project}/locations/{location}/recommenders/{recommender}', - 'recommenderConfig' => 'projects/{project}/locations/{location}/recommenders/{recommender}/config', - ], - ], - ], -]; diff --git a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php b/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php deleted file mode 100644 index c307f800d934..000000000000 --- a/owl-bot-staging/Recommender/v1/src/V1/resources/recommender_rest_client_config.php +++ /dev/null @@ -1,366 +0,0 @@ - [ - 'google.cloud.recommender.v1.Recommender' => [ - 'GetInsight' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInsightTypeConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/config}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/config}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/config}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRecommendation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRecommenderConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/config}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/config}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/config}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInsights' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/insightTypes/*}/insights', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=billingAccounts/*/locations/*/insightTypes/*}/insights', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*/insightTypes/*}/insights', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/insightTypes/*}/insights', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRecommendations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/recommenders/*}/recommendations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=billingAccounts/*/locations/*/recommenders/*}/recommendations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=folders/*/locations/*/recommenders/*}/recommendations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=organizations/*/locations/*/recommenders/*}/recommendations', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MarkInsightAccepted' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/insightTypes/*/insights/*}:markAccepted', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/insightTypes/*/insights/*}:markAccepted', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/insightTypes/*/insights/*}:markAccepted', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/insightTypes/*/insights/*}:markAccepted', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationClaimed' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markClaimed', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markClaimed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markClaimed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markClaimed', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationDismissed' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markDismissed', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markDismissed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markDismissed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markDismissed', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationFailed' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markFailed', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markFailed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markFailed', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markFailed', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'MarkRecommendationSucceeded' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=billingAccounts/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=folders/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=organizations/*/locations/*/recommenders/*/recommendations/*}:markSucceeded', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInsightTypeConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{insight_type_config.name=projects/*/locations/*/insightTypes/*/config}', - 'body' => 'insight_type_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{insight_type_config.name=organizations/*/locations/*/insightTypes/*/config}', - 'body' => 'insight_type_config', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{insight_type_config.name=billingAccounts/*/locations/*/insightTypes/*/config}', - 'body' => 'insight_type_config', - ], - ], - 'placeholders' => [ - 'insight_type_config.name' => [ - 'getters' => [ - 'getInsightTypeConfig', - 'getName', - ], - ], - ], - ], - 'UpdateRecommenderConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{recommender_config.name=projects/*/locations/*/recommenders/*/config}', - 'body' => 'recommender_config', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{recommender_config.name=organizations/*/locations/*/recommenders/*/config}', - 'body' => 'recommender_config', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{recommender_config.name=billingAccounts/*/locations/*/recommenders/*/config}', - 'body' => 'recommender_config', - ], - ], - 'placeholders' => [ - 'recommender_config.name' => [ - 'getters' => [ - 'getRecommenderConfig', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php b/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php deleted file mode 100644 index bb41707d4bac..000000000000 --- a/owl-bot-staging/Recommender/v1/tests/Unit/V1/Client/RecommenderClientTest.php +++ /dev/null @@ -1,1062 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RecommenderClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RecommenderClient($options); - } - - /** @test */ - public function getInsightTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $insightSubtype = 'insightSubtype-1491142701'; - $etag = 'etag3123477'; - $expectedResponse = new Insight(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setInsightSubtype($insightSubtype); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); - $request = (new GetInsightRequest()) - ->setName($formattedName); - $response = $gapicClient->getInsight($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsight', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInsightExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); - $request = (new GetInsightRequest()) - ->setName($formattedName); - try { - $gapicClient->getInsight($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInsightTypeConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $expectedResponse = new InsightTypeConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->insightTypeConfigName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); - $request = (new GetInsightTypeConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getInsightTypeConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsightTypeConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInsightTypeConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->insightTypeConfigName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); - $request = (new GetInsightTypeConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getInsightTypeConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRecommendationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $recommenderSubtype = 'recommenderSubtype-1488504412'; - $etag = 'etag3123477'; - $xorGroupId = 'xorGroupId381095487'; - $expectedResponse = new Recommendation(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRecommenderSubtype($recommenderSubtype); - $expectedResponse->setEtag($etag); - $expectedResponse->setXorGroupId($xorGroupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $request = (new GetRecommendationRequest()) - ->setName($formattedName); - $response = $gapicClient->getRecommendation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/GetRecommendation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRecommendationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $request = (new GetRecommendationRequest()) - ->setName($formattedName); - try { - $gapicClient->getRecommendation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRecommenderConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $expectedResponse = new RecommenderConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommenderConfigName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); - $request = (new GetRecommenderConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getRecommenderConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/GetRecommenderConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRecommenderConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommenderConfigName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); - $request = (new GetRecommenderConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getRecommenderConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInsightsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $insightsElement = new Insight(); - $insights = [ - $insightsElement, - ]; - $expectedResponse = new ListInsightsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInsights($insights); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); - $request = (new ListInsightsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInsights($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInsights()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/ListInsights', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInsightsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->insightTypeName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]'); - $request = (new ListInsightsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInsights($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRecommendationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $recommendationsElement = new Recommendation(); - $recommendations = [ - $recommendationsElement, - ]; - $expectedResponse = new ListRecommendationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRecommendations($recommendations); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); - $request = (new ListRecommendationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRecommendations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRecommendations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/ListRecommendations', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRecommendationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->recommenderName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]'); - $request = (new ListRecommendationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRecommendations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markInsightAcceptedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $insightSubtype = 'insightSubtype-1491142701'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Insight(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setInsightSubtype($insightSubtype); - $expectedResponse->setEtag($etag2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); - $etag = 'etag3123477'; - $request = (new MarkInsightAcceptedRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->markInsightAccepted($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkInsightAccepted', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markInsightAcceptedExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); - $etag = 'etag3123477'; - $request = (new MarkInsightAcceptedRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->markInsightAccepted($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationClaimedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $recommenderSubtype = 'recommenderSubtype-1488504412'; - $etag2 = 'etag2-1293302904'; - $xorGroupId = 'xorGroupId381095487'; - $expectedResponse = new Recommendation(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRecommenderSubtype($recommenderSubtype); - $expectedResponse->setEtag($etag2); - $expectedResponse->setXorGroupId($xorGroupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationClaimedRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->markRecommendationClaimed($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationClaimed', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationClaimedExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationClaimedRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->markRecommendationClaimed($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationDismissedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $recommenderSubtype = 'recommenderSubtype-1488504412'; - $etag2 = 'etag2-1293302904'; - $xorGroupId = 'xorGroupId381095487'; - $expectedResponse = new Recommendation(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRecommenderSubtype($recommenderSubtype); - $expectedResponse->setEtag($etag2); - $expectedResponse->setXorGroupId($xorGroupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $request = (new MarkRecommendationDismissedRequest()) - ->setName($formattedName); - $response = $gapicClient->markRecommendationDismissed($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationDismissed', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationDismissedExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $request = (new MarkRecommendationDismissedRequest()) - ->setName($formattedName); - try { - $gapicClient->markRecommendationDismissed($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationFailedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $recommenderSubtype = 'recommenderSubtype-1488504412'; - $etag2 = 'etag2-1293302904'; - $xorGroupId = 'xorGroupId381095487'; - $expectedResponse = new Recommendation(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRecommenderSubtype($recommenderSubtype); - $expectedResponse->setEtag($etag2); - $expectedResponse->setXorGroupId($xorGroupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationFailedRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->markRecommendationFailed($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationFailed', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationFailedExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationFailedRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->markRecommendationFailed($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationSucceededTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $recommenderSubtype = 'recommenderSubtype-1488504412'; - $etag2 = 'etag2-1293302904'; - $xorGroupId = 'xorGroupId381095487'; - $expectedResponse = new Recommendation(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRecommenderSubtype($recommenderSubtype); - $expectedResponse->setEtag($etag2); - $expectedResponse->setXorGroupId($xorGroupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationSucceededRequest()) - ->setName($formattedName) - ->setEtag($etag); - $response = $gapicClient->markRecommendationSucceeded($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/MarkRecommendationSucceeded', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getEtag(); - $this->assertProtobufEquals($etag, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function markRecommendationSucceededExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->recommendationName('[PROJECT]', '[LOCATION]', '[RECOMMENDER]', '[RECOMMENDATION]'); - $etag = 'etag3123477'; - $request = (new MarkRecommendationSucceededRequest()) - ->setName($formattedName) - ->setEtag($etag); - try { - $gapicClient->markRecommendationSucceeded($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInsightTypeConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $expectedResponse = new InsightTypeConfig(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $insightTypeConfig = new InsightTypeConfig(); - $request = (new UpdateInsightTypeConfigRequest()) - ->setInsightTypeConfig($insightTypeConfig); - $response = $gapicClient->updateInsightTypeConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/UpdateInsightTypeConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getInsightTypeConfig(); - $this->assertProtobufEquals($insightTypeConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInsightTypeConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $insightTypeConfig = new InsightTypeConfig(); - $request = (new UpdateInsightTypeConfigRequest()) - ->setInsightTypeConfig($insightTypeConfig); - try { - $gapicClient->updateInsightTypeConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateRecommenderConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $revisionId = 'revisionId513861631'; - $displayName = 'displayName1615086568'; - $expectedResponse = new RecommenderConfig(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $recommenderConfig = new RecommenderConfig(); - $request = (new UpdateRecommenderConfigRequest()) - ->setRecommenderConfig($recommenderConfig); - $response = $gapicClient->updateRecommenderConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/UpdateRecommenderConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getRecommenderConfig(); - $this->assertProtobufEquals($recommenderConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateRecommenderConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $recommenderConfig = new RecommenderConfig(); - $request = (new UpdateRecommenderConfigRequest()) - ->setRecommenderConfig($recommenderConfig); - try { - $gapicClient->updateRecommenderConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInsightAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $insightSubtype = 'insightSubtype-1491142701'; - $etag = 'etag3123477'; - $expectedResponse = new Insight(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setInsightSubtype($insightSubtype); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->insightName('[PROJECT]', '[LOCATION]', '[INSIGHT_TYPE]', '[INSIGHT]'); - $request = (new GetInsightRequest()) - ->setName($formattedName); - $response = $gapicClient->getInsightAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.recommender.v1.Recommender/GetInsight', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}