From 0640242cf4278af7ad0d4fcd5760085c355aedb5 Mon Sep 17 00:00:00 2001 From: Yvonne Yu CA Date: Tue, 22 Sep 2026 17:58:33 -0700 Subject: [PATCH] feat: include labels for LiveClientSetup PiperOrigin-RevId: 986359438 --- src/converters/_agentengines_converters.ts | 12 ++++++++++++ src/converters/_memorybanks_converters.ts | 12 ++++++++++++ src/types/common.ts | 14 ++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/src/converters/_agentengines_converters.ts b/src/converters/_agentengines_converters.ts index 56324242..b78822bc 100644 --- a/src/converters/_agentengines_converters.ts +++ b/src/converters/_agentengines_converters.ts @@ -598,6 +598,18 @@ export function reasoningEngineFromVertex( common.setValueByPath(toObject, ['trafficConfig'], fromTrafficConfig); } + const fromRevisionGarbageCollectionStrategy = common.getValueByPath( + fromObject, + ['revisionGarbageCollectionStrategy'], + ); + if (fromRevisionGarbageCollectionStrategy != null) { + common.setValueByPath( + toObject, + ['revisionGarbageCollectionStrategy'], + fromRevisionGarbageCollectionStrategy, + ); + } + return toObject; } diff --git a/src/converters/_memorybanks_converters.ts b/src/converters/_memorybanks_converters.ts index e2e1fdc6..88dfd9ec 100644 --- a/src/converters/_memorybanks_converters.ts +++ b/src/converters/_memorybanks_converters.ts @@ -687,6 +687,18 @@ export function reasoningEngineFromVertex( common.setValueByPath(toObject, ['trafficConfig'], fromTrafficConfig); } + const fromRevisionGarbageCollectionStrategy = common.getValueByPath( + fromObject, + ['revisionGarbageCollectionStrategy'], + ); + if (fromRevisionGarbageCollectionStrategy != null) { + common.setValueByPath( + toObject, + ['revisionGarbageCollectionStrategy'], + fromRevisionGarbageCollectionStrategy, + ); + } + return toObject; } diff --git a/src/types/common.ts b/src/types/common.ts index 8e478885..2dec0cc4 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -951,6 +951,18 @@ export declare interface ReasoningEngineTrafficConfig { trafficSplitManual?: ReasoningEngineTrafficConfigTrafficSplitManual; } +/** Keeps only the latest N Runtime Revisions active. */ +export declare interface ReasoningEngineRevisionGarbageCollectionStrategyKeepNLatest { + /** Required. Specifies the maximum number of Runtime Revisions to keep active. If an update to Reasoning Engine would result in exceeding this number of active Runtime Revisions, a new Runtime Revision will be created, while the oldest Runtime Revision will be automatically deleted, providing it's not configured to serve traffic via `traffic_config`. If the oldest Runtime Revision is configured to serve traffic, the update will fail validation. No changes will be made to the Reasoning Engine, existing Runtime Revisions, and no new Runtime Revision will be created. */ + maxRevisions?: number; +} + +/** Configures garbage collection of Runtime Revisions. */ +export declare interface ReasoningEngineRevisionGarbageCollectionStrategy { + /** Optional. Keeps only the latest N Runtime Revisions active. */ + keepNLatest?: ReasoningEngineRevisionGarbageCollectionStrategyKeepNLatest; +} + /** An agent engine. */ export declare interface ReasoningEngine { /** Customer-managed encryption key spec for a ReasoningEngine. If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key. */ @@ -975,6 +987,8 @@ export declare interface ReasoningEngine { updateTime?: string; /** Optional. Traffic distribution configuration for the Reasoning Engine. */ trafficConfig?: ReasoningEngineTrafficConfig; + /** Optional. Configures garbage collection of Runtime Revisions. */ + revisionGarbageCollectionStrategy?: ReasoningEngineRevisionGarbageCollectionStrategy; } /** Operation that has an agent engine as a response. */