// 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/llm_utility_service.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"
	structpb "google.golang.org/protobuf/types/known/structpb"
)

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

// Request message for ComputeTokens RPC call.
type ComputeTokensRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The name of the Endpoint requested to get lists of tokens and
	// token ids.
	Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// Optional. The instances that are the input to token computing API call.
	// Schema is identical to the prediction schema of the text model, even for
	// the non-text models, like chat models, or Codey models.
	Instances []*structpb.Value `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
	// Optional. The name of the publisher model requested to serve the
	// prediction. Format:
	// projects/{project}/locations/{location}/publishers/*/models/*
	Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. Input content.
	Contents      []*Content `protobuf:"bytes,4,rep,name=contents,proto3" json:"contents,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ComputeTokensRequest) ProtoMessage() {}

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

func (x *ComputeTokensRequest) GetEndpoint() string {
	if x != nil {
		return x.Endpoint
	}
	return ""
}

func (x *ComputeTokensRequest) GetInstances() []*structpb.Value {
	if x != nil {
		return x.Instances
	}
	return nil
}

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

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

// Tokens info with a list of tokens and the corresponding list of token ids.
type TokensInfo struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A list of tokens from the input.
	Tokens [][]byte `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// A list of token ids from the input.
	TokenIds []int64 `protobuf:"varint,2,rep,packed,name=token_ids,json=tokenIds,proto3" json:"token_ids,omitempty"`
	// Optional. Optional fields for the role from the corresponding Content.
	Role          string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TokensInfo) ProtoMessage() {}

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

func (x *TokensInfo) GetTokens() [][]byte {
	if x != nil {
		return x.Tokens
	}
	return nil
}

func (x *TokensInfo) GetTokenIds() []int64 {
	if x != nil {
		return x.TokenIds
	}
	return nil
}

func (x *TokensInfo) GetRole() string {
	if x != nil {
		return x.Role
	}
	return ""
}

// Response message for ComputeTokens RPC call.
type ComputeTokensResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Lists of tokens info from the input. A ComputeTokensRequest could have
	// multiple instances with a prompt in each instance. We also need to return
	// lists of tokens info for the request with multiple instances.
	TokensInfo    []*TokensInfo `protobuf:"bytes,1,rep,name=tokens_info,json=tokensInfo,proto3" json:"tokens_info,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ComputeTokensResponse) Reset() {
	*x = ComputeTokensResponse{}
	mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*ComputeTokensResponse) ProtoMessage() {}

func (x *ComputeTokensResponse) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes[2]
	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 ComputeTokensResponse.ProtoReflect.Descriptor instead.
func (*ComputeTokensResponse) Descriptor() ([]byte, []int) {
	return file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescGZIP(), []int{2}
}

func (x *ComputeTokensResponse) GetTokensInfo() []*TokensInfo {
	if x != nil {
		return x.TokensInfo
	}
	return nil
}

var File_google_cloud_aiplatform_v1_llm_utility_service_proto protoreflect.FileDescriptor

const file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDesc = "" +
	"\n" +
	"4google/cloud/aiplatform/v1/llm_utility_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/cloud/aiplatform/v1/content.proto\x1a3google/cloud/aiplatform/v1/prediction_service.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xfa\x01\n" +
	"\x14ComputeTokensRequest\x12F\n" +
	"\bendpoint\x18\x01 \x01(\tB*\xe0A\x02\xfaA$\n" +
	"\"aiplatform.googleapis.com/EndpointR\bendpoint\x129\n" +
	"\tinstances\x18\x02 \x03(\v2\x16.google.protobuf.ValueB\x03\xe0A\x01R\tinstances\x12\x19\n" +
	"\x05model\x18\x03 \x01(\tB\x03\xe0A\x01R\x05model\x12D\n" +
	"\bcontents\x18\x04 \x03(\v2#.google.cloud.aiplatform.v1.ContentB\x03\xe0A\x01R\bcontents\"Z\n" +
	"\n" +
	"TokensInfo\x12\x16\n" +
	"\x06tokens\x18\x01 \x03(\fR\x06tokens\x12\x1b\n" +
	"\ttoken_ids\x18\x02 \x03(\x03R\btokenIds\x12\x17\n" +
	"\x04role\x18\x03 \x01(\tB\x03\xe0A\x01R\x04role\"`\n" +
	"\x15ComputeTokensResponse\x12G\n" +
	"\vtokens_info\x18\x01 \x03(\v2&.google.cloud.aiplatform.v1.TokensInfoR\n" +
	"tokensInfo2\xf8\x06\n" +
	"\x11LlmUtilityService\x12\x81\x03\n" +
	"\vCountTokens\x12..google.cloud.aiplatform.v1.CountTokensRequest\x1a/.google.cloud.aiplatform.v1.CountTokensResponse\"\x90\x02\xdaA\x12endpoint,instances\x82\xd3\xe4\x93\x02\xf4\x01:\x01*ZL:\x01*\"G/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokensZ+:\x01*\"&/v1/{endpoint=endpoints/*}:countTokensZ5:\x01*\"0/v1/{endpoint=publishers/*/models/*}:countTokens\"=/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens\x12\x8f\x03\n" +
	"\rComputeTokens\x120.google.cloud.aiplatform.v1.ComputeTokensRequest\x1a1.google.cloud.aiplatform.v1.ComputeTokensResponse\"\x98\x02\xdaA\x12endpoint,instances\x82\xd3\xe4\x93\x02\xfc\x01:\x01*ZN:\x01*\"I/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokensZ-:\x01*\"(/v1/{endpoint=endpoints/*}:computeTokensZ7:\x01*\"2/v1/{endpoint=publishers/*/models/*}:computeTokens\"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens\x1aM\xcaA\x19aiplatform.googleapis.com\xd2A.https://www.googleapis.com/auth/cloud-platformB\xd4\x01\n" +
	"\x1ecom.google.cloud.aiplatform.v1B\x16LlmUtilityServiceProtoP\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_llm_utility_service_proto_rawDescOnce sync.Once
	file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescData []byte
)

func file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescGZIP() []byte {
	file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescOnce.Do(func() {
		file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDesc), len(file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDesc)))
	})
	return file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDescData
}

var file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_google_cloud_aiplatform_v1_llm_utility_service_proto_goTypes = []any{
	(*ComputeTokensRequest)(nil),  // 0: google.cloud.aiplatform.v1.ComputeTokensRequest
	(*TokensInfo)(nil),            // 1: google.cloud.aiplatform.v1.TokensInfo
	(*ComputeTokensResponse)(nil), // 2: google.cloud.aiplatform.v1.ComputeTokensResponse
	(*structpb.Value)(nil),        // 3: google.protobuf.Value
	(*Content)(nil),               // 4: google.cloud.aiplatform.v1.Content
	(*CountTokensRequest)(nil),    // 5: google.cloud.aiplatform.v1.CountTokensRequest
	(*CountTokensResponse)(nil),   // 6: google.cloud.aiplatform.v1.CountTokensResponse
}
var file_google_cloud_aiplatform_v1_llm_utility_service_proto_depIdxs = []int32{
	3, // 0: google.cloud.aiplatform.v1.ComputeTokensRequest.instances:type_name -> google.protobuf.Value
	4, // 1: google.cloud.aiplatform.v1.ComputeTokensRequest.contents:type_name -> google.cloud.aiplatform.v1.Content
	1, // 2: google.cloud.aiplatform.v1.ComputeTokensResponse.tokens_info:type_name -> google.cloud.aiplatform.v1.TokensInfo
	5, // 3: google.cloud.aiplatform.v1.LlmUtilityService.CountTokens:input_type -> google.cloud.aiplatform.v1.CountTokensRequest
	0, // 4: google.cloud.aiplatform.v1.LlmUtilityService.ComputeTokens:input_type -> google.cloud.aiplatform.v1.ComputeTokensRequest
	6, // 5: google.cloud.aiplatform.v1.LlmUtilityService.CountTokens:output_type -> google.cloud.aiplatform.v1.CountTokensResponse
	2, // 6: google.cloud.aiplatform.v1.LlmUtilityService.ComputeTokens:output_type -> google.cloud.aiplatform.v1.ComputeTokensResponse
	5, // [5:7] is the sub-list for method output_type
	3, // [3:5] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_google_cloud_aiplatform_v1_llm_utility_service_proto_init() }
func file_google_cloud_aiplatform_v1_llm_utility_service_proto_init() {
	if File_google_cloud_aiplatform_v1_llm_utility_service_proto != nil {
		return
	}
	file_google_cloud_aiplatform_v1_content_proto_init()
	file_google_cloud_aiplatform_v1_prediction_service_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDesc), len(file_google_cloud_aiplatform_v1_llm_utility_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_google_cloud_aiplatform_v1_llm_utility_service_proto_goTypes,
		DependencyIndexes: file_google_cloud_aiplatform_v1_llm_utility_service_proto_depIdxs,
		MessageInfos:      file_google_cloud_aiplatform_v1_llm_utility_service_proto_msgTypes,
	}.Build()
	File_google_cloud_aiplatform_v1_llm_utility_service_proto = out.File
	file_google_cloud_aiplatform_v1_llm_utility_service_proto_goTypes = nil
	file_google_cloud_aiplatform_v1_llm_utility_service_proto_depIdxs = nil
}
