Skip to content

Commit f8326a3

Browse files
Google APIscopybara-github
authored andcommitted
feat: allow customers to set encryption_spec for context caching
PiperOrigin-RevId: 752812958
1 parent 79a3b41 commit f8326a3

2 files changed

Lines changed: 26 additions & 8 deletions

File tree

google/cloud/aiplatform/v1/cached_content.proto

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1;
1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
2121
import "google/cloud/aiplatform/v1/content.proto";
22+
import "google/cloud/aiplatform/v1/encryption_spec.proto";
2223
import "google/cloud/aiplatform/v1/tool.proto";
2324
import "google/protobuf/duration.proto";
2425
import "google/protobuf/timestamp.proto";
@@ -87,9 +88,9 @@ message CachedContent {
8788
(google.api.field_behavior) = IMMUTABLE
8889
];
8990

90-
// Immutable. The name of the publisher model to use for cached content.
91-
// Format:
92-
// projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
91+
// Immutable. The name of the `Model` to use for cached content. Currently,
92+
// only the published Gemini base models are supported, in form of
93+
// projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
9394
string model = 2 [(google.api.field_behavior) = IMMUTABLE];
9495

9596
// Optional. Input only. Immutable. Developer set system instruction.
@@ -123,7 +124,7 @@ message CachedContent {
123124
(google.api.field_behavior) = INPUT_ONLY
124125
];
125126

126-
// Output only. Creatation time of the cache entry.
127+
// Output only. Creation time of the cache entry.
127128
google.protobuf.Timestamp create_time = 7
128129
[(google.api.field_behavior) = OUTPUT_ONLY];
129130

@@ -133,4 +134,12 @@ message CachedContent {
133134

134135
// Output only. Metadata on the usage of the cached content.
135136
UsageMetadata usage_metadata = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
137+
138+
// Input only. Immutable. Customer-managed encryption key spec for a
139+
// `CachedContent`. If set, this `CachedContent` and all its sub-resources
140+
// will be secured by this key.
141+
EncryptionSpec encryption_spec = 13 [
142+
(google.api.field_behavior) = INPUT_ONLY,
143+
(google.api.field_behavior) = IMMUTABLE
144+
];
136145
}

google/cloud/aiplatform/v1beta1/cached_content.proto

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1beta1;
1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
2121
import "google/cloud/aiplatform/v1beta1/content.proto";
22+
import "google/cloud/aiplatform/v1beta1/encryption_spec.proto";
2223
import "google/cloud/aiplatform/v1beta1/tool.proto";
2324
import "google/protobuf/duration.proto";
2425
import "google/protobuf/timestamp.proto";
@@ -87,9 +88,9 @@ message CachedContent {
8788
(google.api.field_behavior) = IMMUTABLE
8889
];
8990

90-
// Immutable. The name of the publisher model to use for cached content.
91-
// Format:
92-
// projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
91+
// Immutable. The name of the `Model` to use for cached content. Currently,
92+
// only the published Gemini base models are supported, in form of
93+
// projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
9394
string model = 2 [(google.api.field_behavior) = IMMUTABLE];
9495

9596
// Optional. Input only. Immutable. Developer set system instruction.
@@ -123,7 +124,7 @@ message CachedContent {
123124
(google.api.field_behavior) = INPUT_ONLY
124125
];
125126

126-
// Output only. Creatation time of the cache entry.
127+
// Output only. Creation time of the cache entry.
127128
google.protobuf.Timestamp create_time = 7
128129
[(google.api.field_behavior) = OUTPUT_ONLY];
129130

@@ -133,4 +134,12 @@ message CachedContent {
133134

134135
// Output only. Metadata on the usage of the cached content.
135136
UsageMetadata usage_metadata = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
137+
138+
// Input only. Immutable. Customer-managed encryption key spec for a
139+
// `CachedContent`. If set, this `CachedContent` and all its sub-resources
140+
// will be secured by this key.
141+
EncryptionSpec encryption_spec = 13 [
142+
(google.api.field_behavior) = INPUT_ONLY,
143+
(google.api.field_behavior) = IMMUTABLE
144+
];
136145
}

0 commit comments

Comments
 (0)