// 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/v1/cached_content.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"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)

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)
)

// A resource used in LLM queries for users to explicitly specify what to cache
// and how to cache.
type CachedContent struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Expiration time of the cached content.
	//
	// Types that are valid to be assigned to Expiration:
	//
	//	*CachedContent_ExpireTime
	//	*CachedContent_Ttl
	Expiration isCachedContent_Expiration `protobuf_oneof:"expiration"`
	// Immutable. Identifier. The server-generated resource name of the cached
	// content Format:
	// projects/{project}/locations/{location}/cachedContents/{cached_content}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. Immutable. The user-generated meaningful display name of the
	// cached content.
	DisplayName string `protobuf:"bytes,11,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Immutable. The name of the `Model` to use for cached content. Currently,
	// only the published Gemini base models are supported, in form of
	// projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
	Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. Input only. Immutable. Developer set system instruction.
	// Currently, text only
	SystemInstruction *Content `protobuf:"bytes,3,opt,name=system_instruction,json=systemInstruction,proto3" json:"system_instruction,omitempty"`
	// Optional. Input only. Immutable. The content to cache
	Contents []*Content `protobuf:"bytes,4,rep,name=contents,proto3" json:"contents,omitempty"`
	// Optional. Input only. Immutable. A list of `Tools` the model may use to
	// generate the next response
	Tools []*Tool `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"`
	// Optional. Input only. Immutable. Tool config. This config is shared for all
	// tools
	ToolConfig *ToolConfig `protobuf:"bytes,6,opt,name=tool_config,json=toolConfig,proto3" json:"tool_config,omitempty"`
	// Output only. Creation time of the cache entry.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. When the cache entry was last updated in UTC time.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Output only. Metadata on the usage of the cached content.
	UsageMetadata *CachedContent_UsageMetadata `protobuf:"bytes,12,opt,name=usage_metadata,json=usageMetadata,proto3" json:"usage_metadata,omitempty"`
	// Input only. Immutable. Customer-managed encryption key spec for a
	// `CachedContent`. If set, this `CachedContent` and all its sub-resources
	// will be secured by this key.
	EncryptionSpec *EncryptionSpec `protobuf:"bytes,13,opt,name=encryption_spec,json=encryptionSpec,proto3" json:"encryption_spec,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*CachedContent) ProtoMessage() {}

func (x *CachedContent) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_aiplatform_v1_cached_content_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 CachedContent.ProtoReflect.Descriptor instead.
func (*CachedContent) Descriptor() ([]byte, []int) {
	return file_google_cloud_aiplatform_v1_cached_content_proto_rawDescGZIP(), []int{0}
}

func (x *CachedContent) GetExpiration() isCachedContent_Expiration {
	if x != nil {
		return x.Expiration
	}
	return nil
}

func (x *CachedContent) GetExpireTime() *timestamppb.Timestamp {
	if x != nil {
		if x, ok := x.Expiration.(*CachedContent_ExpireTime); ok {
			return x.ExpireTime
		}
	}
	return nil
}

func (x *CachedContent) GetTtl() *durationpb.Duration {
	if x != nil {
		if x, ok := x.Expiration.(*CachedContent_Ttl); ok {
			return x.Ttl
		}
	}
	return nil
}

func (x *CachedContent) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *CachedContent) GetDisplayName() string {
	if x != nil {
		return x.DisplayName
	}
	return ""
}

func (x *CachedContent) GetModel() string {
	if x != nil {
		return x.Model
	}
	return ""
}

func (x *CachedContent) GetSystemInstruction() *Content {
	if x != nil {
		return x.SystemInstruction
	}
	return nil
}

func (x *CachedContent) GetContents() []*Content {
	if x != nil {
		return x.Contents
	}
	return nil
}

func (x *CachedContent) GetTools() []*Tool {
	if x != nil {
		return x.Tools
	}
	return nil
}

func (x *CachedContent) GetToolConfig() *ToolConfig {
	if x != nil {
		return x.ToolConfig
	}
	return nil
}

func (x *CachedContent) GetCreateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.CreateTime
	}
	return nil
}

func (x *CachedContent) GetUpdateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.UpdateTime
	}
	return nil
}

func (x *CachedContent) GetUsageMetadata() *CachedContent_UsageMetadata {
	if x != nil {
		return x.UsageMetadata
	}
	return nil
}

func (x *CachedContent) GetEncryptionSpec() *EncryptionSpec {
	if x != nil {
		return x.EncryptionSpec
	}
	return nil
}

type isCachedContent_Expiration interface {
	isCachedContent_Expiration()
}

type CachedContent_ExpireTime struct {
	// Timestamp of when this resource is considered expired.
	// This is *always* provided on output, regardless of what was sent
	// on input.
	ExpireTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expire_time,json=expireTime,proto3,oneof"`
}

type CachedContent_Ttl struct {
	// Input only. The TTL for this resource. The expiration time is computed:
	// now + TTL.
	Ttl *durationpb.Duration `protobuf:"bytes,10,opt,name=ttl,proto3,oneof"`
}

func (*CachedContent_ExpireTime) isCachedContent_Expiration() {}

func (*CachedContent_Ttl) isCachedContent_Expiration() {}

// Metadata on the usage of the cached content.
type CachedContent_UsageMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Total number of tokens that the cached content consumes.
	TotalTokenCount int32 `protobuf:"varint,1,opt,name=total_token_count,json=totalTokenCount,proto3" json:"total_token_count,omitempty"`
	// Number of text characters.
	TextCount int32 `protobuf:"varint,2,opt,name=text_count,json=textCount,proto3" json:"text_count,omitempty"`
	// Number of images.
	ImageCount int32 `protobuf:"varint,3,opt,name=image_count,json=imageCount,proto3" json:"image_count,omitempty"`
	// Duration of video in seconds.
	VideoDurationSeconds int32 `protobuf:"varint,4,opt,name=video_duration_seconds,json=videoDurationSeconds,proto3" json:"video_duration_seconds,omitempty"`
	// Duration of audio in seconds.
	AudioDurationSeconds int32 `protobuf:"varint,5,opt,name=audio_duration_seconds,json=audioDurationSeconds,proto3" json:"audio_duration_seconds,omitempty"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

func (x *CachedContent_UsageMetadata) Reset() {
	*x = CachedContent_UsageMetadata{}
	mi := &file_google_cloud_aiplatform_v1_cached_content_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*CachedContent_UsageMetadata) ProtoMessage() {}

func (x *CachedContent_UsageMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_aiplatform_v1_cached_content_proto_msgTypes[1]
	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 CachedContent_UsageMetadata.ProtoReflect.Descriptor instead.
func (*CachedContent_UsageMetadata) Descriptor() ([]byte, []int) {
	return file_google_cloud_aiplatform_v1_cached_content_proto_rawDescGZIP(), []int{0, 0}
}

func (x *CachedContent_UsageMetadata) GetTotalTokenCount() int32 {
	if x != nil {
		return x.TotalTokenCount
	}
	return 0
}

func (x *CachedContent_UsageMetadata) GetTextCount() int32 {
	if x != nil {
		return x.TextCount
	}
	return 0
}

func (x *CachedContent_UsageMetadata) GetImageCount() int32 {
	if x != nil {
		return x.ImageCount
	}
	return 0
}

func (x *CachedContent_UsageMetadata) GetVideoDurationSeconds() int32 {
	if x != nil {
		return x.VideoDurationSeconds
	}
	return 0
}

func (x *CachedContent_UsageMetadata) GetAudioDurationSeconds() int32 {
	if x != nil {
		return x.AudioDurationSeconds
	}
	return 0
}

var File_google_cloud_aiplatform_v1_cached_content_proto protoreflect.FileDescriptor

const file_google_cloud_aiplatform_v1_cached_content_proto_rawDesc = "" +
	"\n" +
	"/google/cloud/aiplatform/v1/cached_content.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a0google/cloud/aiplatform/v1/encryption_spec.proto\x1a%google/cloud/aiplatform/v1/tool.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\t\n" +
	"\rCachedContent\x12=\n" +
	"\vexpire_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x00R\n" +
	"expireTime\x122\n" +
	"\x03ttl\x18\n" +
	" \x01(\v2\x19.google.protobuf.DurationB\x03\xe0A\x04H\x00R\x03ttl\x12\x1a\n" +
	"\x04name\x18\x01 \x01(\tB\x06\xe0A\b\xe0A\x05R\x04name\x12)\n" +
	"\fdisplay_name\x18\v \x01(\tB\x06\xe0A\x01\xe0A\x05R\vdisplayName\x12\x19\n" +
	"\x05model\x18\x02 \x01(\tB\x03\xe0A\x05R\x05model\x12]\n" +
	"\x12system_instruction\x18\x03 \x01(\v2#.google.cloud.aiplatform.v1.ContentB\t\xe0A\x01\xe0A\x05\xe0A\x04R\x11systemInstruction\x12J\n" +
	"\bcontents\x18\x04 \x03(\v2#.google.cloud.aiplatform.v1.ContentB\t\xe0A\x01\xe0A\x05\xe0A\x04R\bcontents\x12A\n" +
	"\x05tools\x18\x05 \x03(\v2 .google.cloud.aiplatform.v1.ToolB\t\xe0A\x01\xe0A\x05\xe0A\x04R\x05tools\x12R\n" +
	"\vtool_config\x18\x06 \x01(\v2&.google.cloud.aiplatform.v1.ToolConfigB\t\xe0A\x01\xe0A\x05\xe0A\x04R\n" +
	"toolConfig\x12@\n" +
	"\vcreate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
	"createTime\x12@\n" +
	"\vupdate_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
	"updateTime\x12c\n" +
	"\x0eusage_metadata\x18\f \x01(\v27.google.cloud.aiplatform.v1.CachedContent.UsageMetadataB\x03\xe0A\x03R\rusageMetadata\x12[\n" +
	"\x0fencryption_spec\x18\r \x01(\v2*.google.cloud.aiplatform.v1.EncryptionSpecB\x06\xe0A\x04\xe0A\x05R\x0eencryptionSpec\x1a\xe7\x01\n" +
	"\rUsageMetadata\x12*\n" +
	"\x11total_token_count\x18\x01 \x01(\x05R\x0ftotalTokenCount\x12\x1d\n" +
	"\n" +
	"text_count\x18\x02 \x01(\x05R\ttextCount\x12\x1f\n" +
	"\vimage_count\x18\x03 \x01(\x05R\n" +
	"imageCount\x124\n" +
	"\x16video_duration_seconds\x18\x04 \x01(\x05R\x14videoDurationSeconds\x124\n" +
	"\x16audio_duration_seconds\x18\x05 \x01(\x05R\x14audioDurationSeconds:\x95\x01\xeaA\x91\x01\n" +
	"'aiplatform.googleapis.com/CachedContent\x12Gprojects/{project}/locations/{location}/cachedContents/{cached_content}*\x0ecachedContents2\rcachedContentB\f\n" +
	"\n" +
	"expirationB\xd0\x01\n" +
	"\x1ecom.google.cloud.aiplatform.v1B\x12CachedContentProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"

var (
	file_google_cloud_aiplatform_v1_cached_content_proto_rawDescOnce sync.Once
	file_google_cloud_aiplatform_v1_cached_content_proto_rawDescData []byte
)

func file_google_cloud_aiplatform_v1_cached_content_proto_rawDescGZIP() []byte {
	file_google_cloud_aiplatform_v1_cached_content_proto_rawDescOnce.Do(func() {
		file_google_cloud_aiplatform_v1_cached_content_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1_cached_content_proto_rawDesc), len(file_google_cloud_aiplatform_v1_cached_content_proto_rawDesc)))
	})
	return file_google_cloud_aiplatform_v1_cached_content_proto_rawDescData
}

var file_google_cloud_aiplatform_v1_cached_content_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_google_cloud_aiplatform_v1_cached_content_proto_goTypes = []any{
	(*CachedContent)(nil),               // 0: google.cloud.aiplatform.v1.CachedContent
	(*CachedContent_UsageMetadata)(nil), // 1: google.cloud.aiplatform.v1.CachedContent.UsageMetadata
	(*timestamppb.Timestamp)(nil),       // 2: google.protobuf.Timestamp
	(*durationpb.Duration)(nil),         // 3: google.protobuf.Duration
	(*Content)(nil),                     // 4: google.cloud.aiplatform.v1.Content
	(*Tool)(nil),                        // 5: google.cloud.aiplatform.v1.Tool
	(*ToolConfig)(nil),                  // 6: google.cloud.aiplatform.v1.ToolConfig
	(*EncryptionSpec)(nil),              // 7: google.cloud.aiplatform.v1.EncryptionSpec
}
var file_google_cloud_aiplatform_v1_cached_content_proto_depIdxs = []int32{
	2,  // 0: google.cloud.aiplatform.v1.CachedContent.expire_time:type_name -> google.protobuf.Timestamp
	3,  // 1: google.cloud.aiplatform.v1.CachedContent.ttl:type_name -> google.protobuf.Duration
	4,  // 2: google.cloud.aiplatform.v1.CachedContent.system_instruction:type_name -> google.cloud.aiplatform.v1.Content
	4,  // 3: google.cloud.aiplatform.v1.CachedContent.contents:type_name -> google.cloud.aiplatform.v1.Content
	5,  // 4: google.cloud.aiplatform.v1.CachedContent.tools:type_name -> google.cloud.aiplatform.v1.Tool
	6,  // 5: google.cloud.aiplatform.v1.CachedContent.tool_config:type_name -> google.cloud.aiplatform.v1.ToolConfig
	2,  // 6: google.cloud.aiplatform.v1.CachedContent.create_time:type_name -> google.protobuf.Timestamp
	2,  // 7: google.cloud.aiplatform.v1.CachedContent.update_time:type_name -> google.protobuf.Timestamp
	1,  // 8: google.cloud.aiplatform.v1.CachedContent.usage_metadata:type_name -> google.cloud.aiplatform.v1.CachedContent.UsageMetadata
	7,  // 9: google.cloud.aiplatform.v1.CachedContent.encryption_spec:type_name -> google.cloud.aiplatform.v1.EncryptionSpec
	10, // [10:10] is the sub-list for method output_type
	10, // [10:10] is the sub-list for method input_type
	10, // [10:10] is the sub-list for extension type_name
	10, // [10:10] is the sub-list for extension extendee
	0,  // [0:10] is the sub-list for field type_name
}

func init() { file_google_cloud_aiplatform_v1_cached_content_proto_init() }
func file_google_cloud_aiplatform_v1_cached_content_proto_init() {
	if File_google_cloud_aiplatform_v1_cached_content_proto != nil {
		return
	}
	file_google_cloud_aiplatform_v1_content_proto_init()
	file_google_cloud_aiplatform_v1_encryption_spec_proto_init()
	file_google_cloud_aiplatform_v1_tool_proto_init()
	file_google_cloud_aiplatform_v1_cached_content_proto_msgTypes[0].OneofWrappers = []any{
		(*CachedContent_ExpireTime)(nil),
		(*CachedContent_Ttl)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1_cached_content_proto_rawDesc), len(file_google_cloud_aiplatform_v1_cached_content_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_aiplatform_v1_cached_content_proto_goTypes,
		DependencyIndexes: file_google_cloud_aiplatform_v1_cached_content_proto_depIdxs,
		MessageInfos:      file_google_cloud_aiplatform_v1_cached_content_proto_msgTypes,
	}.Build()
	File_google_cloud_aiplatform_v1_cached_content_proto = out.File
	file_google_cloud_aiplatform_v1_cached_content_proto_goTypes = nil
	file_google_cloud_aiplatform_v1_cached_content_proto_depIdxs = nil
}
