// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v6.33.2
// source: google/cloud/aiplatform/v1beta1/reservation_affinity.proto

package aiplatformpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Identifies a type of reservation affinity.
type ReservationAffinity_Type int32

const (
	// Default value. This should not be used.
	ReservationAffinity_TYPE_UNSPECIFIED ReservationAffinity_Type = 0
	// Do not consume from any reserved capacity, only use on-demand.
	ReservationAffinity_NO_RESERVATION ReservationAffinity_Type = 1
	// Consume any reservation available, falling back to on-demand.
	ReservationAffinity_ANY_RESERVATION ReservationAffinity_Type = 2
	// Consume from a specific reservation. When chosen, the reservation
	// must be identified via the `key` and `values` fields.
	ReservationAffinity_SPECIFIC_RESERVATION ReservationAffinity_Type = 3
)

// Enum value maps for ReservationAffinity_Type.
var (
	ReservationAffinity_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "NO_RESERVATION",
		2: "ANY_RESERVATION",
		3: "SPECIFIC_RESERVATION",
	}
	ReservationAffinity_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":     0,
		"NO_RESERVATION":       1,
		"ANY_RESERVATION":      2,
		"SPECIFIC_RESERVATION": 3,
	}
)

func (x ReservationAffinity_Type) Enum() *ReservationAffinity_Type {
	p := new(ReservationAffinity_Type)
	*p = x
	return p
}

func (x ReservationAffinity_Type) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ReservationAffinity_Type) Descriptor() protoreflect.EnumDescriptor {
	return file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_enumTypes[0].Descriptor()
}

func (ReservationAffinity_Type) Type() protoreflect.EnumType {
	return &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_enumTypes[0]
}

func (x ReservationAffinity_Type) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ReservationAffinity_Type.Descriptor instead.
func (ReservationAffinity_Type) EnumDescriptor() ([]byte, []int) {
	return file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescGZIP(), []int{0, 0}
}

// A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
// DeployedModel) to draw its Compute Engine resources from a Shared
// Reservation, or exclusively from on-demand capacity.
type ReservationAffinity struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. Specifies the reservation affinity type.
	ReservationAffinityType ReservationAffinity_Type `protobuf:"varint,1,opt,name=reservation_affinity_type,json=reservationAffinityType,proto3,enum=google.cloud.aiplatform.v1beta1.ReservationAffinity_Type" json:"reservation_affinity_type,omitempty"`
	// Optional. Corresponds to the label key of a reservation resource. To target
	// a SPECIFIC_RESERVATION by name, use
	// `compute.googleapis.com/reservation-name` as the key and specify the name
	// of your reservation as its value.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Optional. Corresponds to the label values of a reservation resource. This
	// must be the full resource name of the reservation.
	Values        []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ReservationAffinity) Reset() {
	*x = ReservationAffinity{}
	mi := &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ReservationAffinity) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ReservationAffinity) ProtoMessage() {}

func (x *ReservationAffinity) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ReservationAffinity.ProtoReflect.Descriptor instead.
func (*ReservationAffinity) Descriptor() ([]byte, []int) {
	return file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescGZIP(), []int{0}
}

func (x *ReservationAffinity) GetReservationAffinityType() ReservationAffinity_Type {
	if x != nil {
		return x.ReservationAffinityType
	}
	return ReservationAffinity_TYPE_UNSPECIFIED
}

func (x *ReservationAffinity) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *ReservationAffinity) GetValues() []string {
	if x != nil {
		return x.Values
	}
	return nil
}

var File_google_cloud_aiplatform_v1beta1_reservation_affinity_proto protoreflect.FileDescriptor

const file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDesc = "" +
	"\n" +
	":google/cloud/aiplatform/v1beta1/reservation_affinity.proto\x12\x1fgoogle.cloud.aiplatform.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcd\x02\n" +
	"\x13ReservationAffinity\x12z\n" +
	"\x19reservation_affinity_type\x18\x01 \x01(\x0e29.google.cloud.aiplatform.v1beta1.ReservationAffinity.TypeB\x03\xe0A\x02R\x17reservationAffinityType\x12\x15\n" +
	"\x03key\x18\x02 \x01(\tB\x03\xe0A\x01R\x03key\x12B\n" +
	"\x06values\x18\x03 \x03(\tB*\xe0A\x01\xfaA$\n" +
	"\"compute.googleapis.com/ReservationR\x06values\"_\n" +
	"\x04Type\x12\x14\n" +
	"\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n" +
	"\x0eNO_RESERVATION\x10\x01\x12\x13\n" +
	"\x0fANY_RESERVATION\x10\x02\x12\x18\n" +
	"\x14SPECIFIC_RESERVATION\x10\x03B\xe4\x02\xeaAr\n" +
	"\"compute.googleapis.com/Reservation\x12Lprojects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}\n" +
	"#com.google.cloud.aiplatform.v1beta1B\x18ReservationAffinityProtoP\x01ZCcloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb\xaa\x02\x1fGoogle.Cloud.AIPlatform.V1Beta1\xca\x02\x1fGoogle\\Cloud\\AIPlatform\\V1beta1\xea\x02\"Google::Cloud::AIPlatform::V1beta1b\x06proto3"

var (
	file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescOnce sync.Once
	file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescData []byte
)

func file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescGZIP() []byte {
	file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescOnce.Do(func() {
		file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDesc), len(file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDesc)))
	})
	return file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDescData
}

var file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_goTypes = []any{
	(ReservationAffinity_Type)(0), // 0: google.cloud.aiplatform.v1beta1.ReservationAffinity.Type
	(*ReservationAffinity)(nil),   // 1: google.cloud.aiplatform.v1beta1.ReservationAffinity
}
var file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_depIdxs = []int32{
	0, // 0: google.cloud.aiplatform.v1beta1.ReservationAffinity.reservation_affinity_type:type_name -> google.cloud.aiplatform.v1beta1.ReservationAffinity.Type
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_init() }
func file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_init() {
	if File_google_cloud_aiplatform_v1beta1_reservation_affinity_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDesc), len(file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_goTypes,
		DependencyIndexes: file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_depIdxs,
		EnumInfos:         file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_enumTypes,
		MessageInfos:      file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_msgTypes,
	}.Build()
	File_google_cloud_aiplatform_v1beta1_reservation_affinity_proto = out.File
	file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_goTypes = nil
	file_google_cloud_aiplatform_v1beta1_reservation_affinity_proto_depIdxs = nil
}
