|
| 1 | +// Copyright 2024 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.aiplatform.v1beta1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | + |
| 22 | +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; |
| 23 | +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; |
| 24 | +option java_multiple_files = true; |
| 25 | +option java_outer_classname = "ReservationAffinityProto"; |
| 26 | +option java_package = "com.google.cloud.aiplatform.v1beta1"; |
| 27 | +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; |
| 28 | +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; |
| 29 | +option (google.api.resource_definition) = { |
| 30 | + type: "compute.googleapis.com/Reservation" |
| 31 | + pattern: "projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}" |
| 32 | +}; |
| 33 | + |
| 34 | +// A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a |
| 35 | +// DeployedModel) to draw its Compute Engine resources from a Shared |
| 36 | +// Reservation, or exclusively from on-demand capacity. |
| 37 | +message ReservationAffinity { |
| 38 | + // Identifies a type of reservation affinity. |
| 39 | + enum Type { |
| 40 | + // Default value. This should not be used. |
| 41 | + TYPE_UNSPECIFIED = 0; |
| 42 | + |
| 43 | + // Do not consume from any reserved capacity, only use on-demand. |
| 44 | + NO_RESERVATION = 1; |
| 45 | + |
| 46 | + // Consume any reservation available, falling back to on-demand. |
| 47 | + ANY_RESERVATION = 2; |
| 48 | + |
| 49 | + // Consume from a specific reservation. When chosen, the reservation |
| 50 | + // must be identified via the `key` and `values` fields. |
| 51 | + SPECIFIC_RESERVATION = 3; |
| 52 | + } |
| 53 | + |
| 54 | + // Required. Specifies the reservation affinity type. |
| 55 | + Type reservation_affinity_type = 1 [(google.api.field_behavior) = REQUIRED]; |
| 56 | + |
| 57 | + // Optional. Corresponds to the label key of a reservation resource. To target |
| 58 | + // a SPECIFIC_RESERVATION by name, use |
| 59 | + // `compute.googleapis.com/reservation-name` as the key and specify the name |
| 60 | + // of your reservation as its value. |
| 61 | + string key = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 62 | + |
| 63 | + // Optional. Corresponds to the label values of a reservation resource. This |
| 64 | + // must be the full resource name of the reservation. |
| 65 | + repeated string values = 3 [ |
| 66 | + (google.api.field_behavior) = OPTIONAL, |
| 67 | + (google.api.resource_reference) = { |
| 68 | + type: "compute.googleapis.com/Reservation" |
| 69 | + } |
| 70 | + ]; |
| 71 | +} |
0 commit comments