diff --git a/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go b/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go new file mode 100755 index 000000000000..a961eafcd6f3 --- /dev/null +++ b/aiplatform/apiv1/aiplatformpb/genai_tuning_service.pb.go @@ -0,0 +1,824 @@ +// Copyright 2024 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.32.0 +// protoc v4.25.2 +// source: google/cloud/aiplatform/v1/genai_tuning_service.proto + +package aiplatformpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +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 +// [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob]. +type CreateTuningJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Location to create the TuningJob in. + // Format: `projects/{project}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The TuningJob to create. + TuningJob *TuningJob `protobuf:"bytes,2,opt,name=tuning_job,json=tuningJob,proto3" json:"tuning_job,omitempty"` +} + +func (x *CreateTuningJobRequest) Reset() { + *x = CreateTuningJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTuningJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTuningJobRequest) ProtoMessage() {} + +func (x *CreateTuningJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTuningJobRequest.ProtoReflect.Descriptor instead. +func (*CreateTuningJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateTuningJobRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateTuningJobRequest) GetTuningJob() *TuningJob { + if x != nil { + return x.TuningJob + } + return nil +} + +// Request message for +// [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]. +type GetTuningJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the TuningJob resource. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetTuningJobRequest) Reset() { + *x = GetTuningJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTuningJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTuningJobRequest) ProtoMessage() {} + +func (x *GetTuningJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetTuningJobRequest.ProtoReflect.Descriptor instead. +func (*GetTuningJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetTuningJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs]. +type ListTuningJobsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Location to list the TuningJobs from. + // Format: `projects/{project}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. The standard list filter. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. The standard list page size. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. The standard list page token. + // Typically obtained via [ListTuningJob.next_page_token][] of the + // previous GenAiTuningService.ListTuningJob][] call. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListTuningJobsRequest) Reset() { + *x = ListTuningJobsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTuningJobsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTuningJobsRequest) ProtoMessage() {} + +func (x *ListTuningJobsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTuningJobsRequest.ProtoReflect.Descriptor instead. +func (*ListTuningJobsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTuningJobsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListTuningJobsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListTuningJobsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListTuningJobsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs] +type ListTuningJobsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of TuningJobs in the requested page. + TuningJobs []*TuningJob `protobuf:"bytes,1,rep,name=tuning_jobs,json=tuningJobs,proto3" json:"tuning_jobs,omitempty"` + // A token to retrieve the next page of results. + // Pass to + // [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + // to obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListTuningJobsResponse) Reset() { + *x = ListTuningJobsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTuningJobsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTuningJobsResponse) ProtoMessage() {} + +func (x *ListTuningJobsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTuningJobsResponse.ProtoReflect.Descriptor instead. +func (*ListTuningJobsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListTuningJobsResponse) GetTuningJobs() []*TuningJob { + if x != nil { + return x.TuningJobs + } + return nil +} + +func (x *ListTuningJobsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob]. +type CancelTuningJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the TuningJob to cancel. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CancelTuningJobRequest) Reset() { + *x = CancelTuningJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CancelTuningJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelTuningJobRequest) ProtoMessage() {} + +func (x *CancelTuningJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelTuningJobRequest.ProtoReflect.Descriptor instead. +func (*CancelTuningJobRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CancelTuningJobRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_aiplatform_v1_genai_tuning_service_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, + 0x61, 0x69, 0x5f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa6, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x49, + 0x0a, 0x0a, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, + 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x22, 0x56, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, + 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x4a, 0x6f, 0x62, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x59, 0x0a, 0x16, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x25, 0x0a, 0x23, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, + 0x62, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xb6, 0x06, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x41, + 0x69, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc4, + 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, + 0x6f, 0x62, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x22, 0x56, 0xda, + 0x41, 0x11, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, + 0x6a, 0x6f, 0x62, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x3a, 0x0a, 0x74, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x22, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x22, 0x3d, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xb8, 0x01, + 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, + 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x75, + 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x12, 0xa6, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x12, 0x32, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x47, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x01, 0x2a, 0x22, 0x35, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x74, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x1a, 0x4d, 0xca, 0x41, 0x19, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, + 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x42, 0xd5, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x2e, 0x76, 0x31, 0x42, 0x17, 0x47, 0x65, 0x6e, 0x41, 0x69, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, + 0x62, 0x3b, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0xaa, 0x02, + 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x49, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x47, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x49, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescData = file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_aiplatform_v1_genai_tuning_service_proto_goTypes = []interface{}{ + (*CreateTuningJobRequest)(nil), // 0: google.cloud.aiplatform.v1.CreateTuningJobRequest + (*GetTuningJobRequest)(nil), // 1: google.cloud.aiplatform.v1.GetTuningJobRequest + (*ListTuningJobsRequest)(nil), // 2: google.cloud.aiplatform.v1.ListTuningJobsRequest + (*ListTuningJobsResponse)(nil), // 3: google.cloud.aiplatform.v1.ListTuningJobsResponse + (*CancelTuningJobRequest)(nil), // 4: google.cloud.aiplatform.v1.CancelTuningJobRequest + (*TuningJob)(nil), // 5: google.cloud.aiplatform.v1.TuningJob + (*emptypb.Empty)(nil), // 6: google.protobuf.Empty +} +var file_google_cloud_aiplatform_v1_genai_tuning_service_proto_depIdxs = []int32{ + 5, // 0: google.cloud.aiplatform.v1.CreateTuningJobRequest.tuning_job:type_name -> google.cloud.aiplatform.v1.TuningJob + 5, // 1: google.cloud.aiplatform.v1.ListTuningJobsResponse.tuning_jobs:type_name -> google.cloud.aiplatform.v1.TuningJob + 0, // 2: google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob:input_type -> google.cloud.aiplatform.v1.CreateTuningJobRequest + 1, // 3: google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob:input_type -> google.cloud.aiplatform.v1.GetTuningJobRequest + 2, // 4: google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs:input_type -> google.cloud.aiplatform.v1.ListTuningJobsRequest + 4, // 5: google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob:input_type -> google.cloud.aiplatform.v1.CancelTuningJobRequest + 5, // 6: google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob:output_type -> google.cloud.aiplatform.v1.TuningJob + 5, // 7: google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob:output_type -> google.cloud.aiplatform.v1.TuningJob + 3, // 8: google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs:output_type -> google.cloud.aiplatform.v1.ListTuningJobsResponse + 6, // 9: google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob:output_type -> google.protobuf.Empty + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1_genai_tuning_service_proto_init() } +func file_google_cloud_aiplatform_v1_genai_tuning_service_proto_init() { + if File_google_cloud_aiplatform_v1_genai_tuning_service_proto != nil { + return + } + file_google_cloud_aiplatform_v1_tuning_job_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateTuningJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTuningJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTuningJobsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTuningJobsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CancelTuningJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_aiplatform_v1_genai_tuning_service_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1_genai_tuning_service_proto_depIdxs, + MessageInfos: file_google_cloud_aiplatform_v1_genai_tuning_service_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1_genai_tuning_service_proto = out.File + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_rawDesc = nil + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_goTypes = nil + file_google_cloud_aiplatform_v1_genai_tuning_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// GenAiTuningServiceClient is the client API for GenAiTuningService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GenAiTuningServiceClient interface { + // Creates a TuningJob. A created TuningJob right away will be attempted to + // be run. + CreateTuningJob(ctx context.Context, in *CreateTuningJobRequest, opts ...grpc.CallOption) (*TuningJob, error) + // Gets a TuningJob. + GetTuningJob(ctx context.Context, in *GetTuningJobRequest, opts ...grpc.CallOption) (*TuningJob, error) + // Lists TuningJobs in a Location. + ListTuningJobs(ctx context.Context, in *ListTuningJobsRequest, opts ...grpc.CallOption) (*ListTuningJobsResponse, error) + // Cancels a TuningJob. + // Starts asynchronous cancellation on the TuningJob. The server makes a best + // effort to cancel the job, but success is not guaranteed. Clients can use + // [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + // or other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, the + // TuningJob is not deleted; instead it becomes a job with a + // [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`, and + // [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to + // `CANCELLED`. + CancelTuningJob(ctx context.Context, in *CancelTuningJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type genAiTuningServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewGenAiTuningServiceClient(cc grpc.ClientConnInterface) GenAiTuningServiceClient { + return &genAiTuningServiceClient{cc} +} + +func (c *genAiTuningServiceClient) CreateTuningJob(ctx context.Context, in *CreateTuningJobRequest, opts ...grpc.CallOption) (*TuningJob, error) { + out := new(TuningJob) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1.GenAiTuningService/CreateTuningJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genAiTuningServiceClient) GetTuningJob(ctx context.Context, in *GetTuningJobRequest, opts ...grpc.CallOption) (*TuningJob, error) { + out := new(TuningJob) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1.GenAiTuningService/GetTuningJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genAiTuningServiceClient) ListTuningJobs(ctx context.Context, in *ListTuningJobsRequest, opts ...grpc.CallOption) (*ListTuningJobsResponse, error) { + out := new(ListTuningJobsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1.GenAiTuningService/ListTuningJobs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *genAiTuningServiceClient) CancelTuningJob(ctx context.Context, in *CancelTuningJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GenAiTuningServiceServer is the server API for GenAiTuningService service. +type GenAiTuningServiceServer interface { + // Creates a TuningJob. A created TuningJob right away will be attempted to + // be run. + CreateTuningJob(context.Context, *CreateTuningJobRequest) (*TuningJob, error) + // Gets a TuningJob. + GetTuningJob(context.Context, *GetTuningJobRequest) (*TuningJob, error) + // Lists TuningJobs in a Location. + ListTuningJobs(context.Context, *ListTuningJobsRequest) (*ListTuningJobsResponse, error) + // Cancels a TuningJob. + // Starts asynchronous cancellation on the TuningJob. The server makes a best + // effort to cancel the job, but success is not guaranteed. Clients can use + // [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + // or other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, the + // TuningJob is not deleted; instead it becomes a job with a + // [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`, and + // [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to + // `CANCELLED`. + CancelTuningJob(context.Context, *CancelTuningJobRequest) (*emptypb.Empty, error) +} + +// UnimplementedGenAiTuningServiceServer can be embedded to have forward compatible implementations. +type UnimplementedGenAiTuningServiceServer struct { +} + +func (*UnimplementedGenAiTuningServiceServer) CreateTuningJob(context.Context, *CreateTuningJobRequest) (*TuningJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateTuningJob not implemented") +} +func (*UnimplementedGenAiTuningServiceServer) GetTuningJob(context.Context, *GetTuningJobRequest) (*TuningJob, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTuningJob not implemented") +} +func (*UnimplementedGenAiTuningServiceServer) ListTuningJobs(context.Context, *ListTuningJobsRequest) (*ListTuningJobsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTuningJobs not implemented") +} +func (*UnimplementedGenAiTuningServiceServer) CancelTuningJob(context.Context, *CancelTuningJobRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelTuningJob not implemented") +} + +func RegisterGenAiTuningServiceServer(s *grpc.Server, srv GenAiTuningServiceServer) { + s.RegisterService(&_GenAiTuningService_serviceDesc, srv) +} + +func _GenAiTuningService_CreateTuningJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTuningJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenAiTuningServiceServer).CreateTuningJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1.GenAiTuningService/CreateTuningJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenAiTuningServiceServer).CreateTuningJob(ctx, req.(*CreateTuningJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GenAiTuningService_GetTuningJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTuningJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenAiTuningServiceServer).GetTuningJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1.GenAiTuningService/GetTuningJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenAiTuningServiceServer).GetTuningJob(ctx, req.(*GetTuningJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GenAiTuningService_ListTuningJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTuningJobsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenAiTuningServiceServer).ListTuningJobs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1.GenAiTuningService/ListTuningJobs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenAiTuningServiceServer).ListTuningJobs(ctx, req.(*ListTuningJobsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GenAiTuningService_CancelTuningJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelTuningJobRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GenAiTuningServiceServer).CancelTuningJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GenAiTuningServiceServer).CancelTuningJob(ctx, req.(*CancelTuningJobRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _GenAiTuningService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.aiplatform.v1.GenAiTuningService", + HandlerType: (*GenAiTuningServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateTuningJob", + Handler: _GenAiTuningService_CreateTuningJob_Handler, + }, + { + MethodName: "GetTuningJob", + Handler: _GenAiTuningService_GetTuningJob_Handler, + }, + { + MethodName: "ListTuningJobs", + Handler: _GenAiTuningService_ListTuningJobs_Handler, + }, + { + MethodName: "CancelTuningJob", + Handler: _GenAiTuningService_CancelTuningJob_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/aiplatform/v1/genai_tuning_service.proto", +} diff --git a/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go b/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go new file mode 100755 index 000000000000..603cfc3dfa38 --- /dev/null +++ b/aiplatform/apiv1/aiplatformpb/tuning_job.pb.go @@ -0,0 +1,1333 @@ +// Copyright 2024 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.32.0 +// protoc v4.25.2 +// source: google/cloud/aiplatform/v1/tuning_job.proto + +package aiplatformpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + 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) +) + +// Supported adapter sizes for tuning. +type SupervisedHyperParameters_AdapterSize int32 + +const ( + // Adapter size is unspecified. + SupervisedHyperParameters_ADAPTER_SIZE_UNSPECIFIED SupervisedHyperParameters_AdapterSize = 0 + // Adapter size 1. + SupervisedHyperParameters_ADAPTER_SIZE_ONE SupervisedHyperParameters_AdapterSize = 1 + // Adapter size 4. + SupervisedHyperParameters_ADAPTER_SIZE_FOUR SupervisedHyperParameters_AdapterSize = 2 + // Adapter size 8. + SupervisedHyperParameters_ADAPTER_SIZE_EIGHT SupervisedHyperParameters_AdapterSize = 3 + // Adapter size 16. + SupervisedHyperParameters_ADAPTER_SIZE_SIXTEEN SupervisedHyperParameters_AdapterSize = 4 +) + +// Enum value maps for SupervisedHyperParameters_AdapterSize. +var ( + SupervisedHyperParameters_AdapterSize_name = map[int32]string{ + 0: "ADAPTER_SIZE_UNSPECIFIED", + 1: "ADAPTER_SIZE_ONE", + 2: "ADAPTER_SIZE_FOUR", + 3: "ADAPTER_SIZE_EIGHT", + 4: "ADAPTER_SIZE_SIXTEEN", + } + SupervisedHyperParameters_AdapterSize_value = map[string]int32{ + "ADAPTER_SIZE_UNSPECIFIED": 0, + "ADAPTER_SIZE_ONE": 1, + "ADAPTER_SIZE_FOUR": 2, + "ADAPTER_SIZE_EIGHT": 3, + "ADAPTER_SIZE_SIXTEEN": 4, + } +) + +func (x SupervisedHyperParameters_AdapterSize) Enum() *SupervisedHyperParameters_AdapterSize { + p := new(SupervisedHyperParameters_AdapterSize) + *p = x + return p +} + +func (x SupervisedHyperParameters_AdapterSize) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SupervisedHyperParameters_AdapterSize) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_aiplatform_v1_tuning_job_proto_enumTypes[0].Descriptor() +} + +func (SupervisedHyperParameters_AdapterSize) Type() protoreflect.EnumType { + return &file_google_cloud_aiplatform_v1_tuning_job_proto_enumTypes[0] +} + +func (x SupervisedHyperParameters_AdapterSize) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SupervisedHyperParameters_AdapterSize.Descriptor instead. +func (SupervisedHyperParameters_AdapterSize) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{5, 0} +} + +// Represents a TuningJob that runs with Google owned models. +type TuningJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SourceModel: + // + // *TuningJob_BaseModel + SourceModel isTuningJob_SourceModel `protobuf_oneof:"source_model"` + // Types that are assignable to TuningSpec: + // + // *TuningJob_SupervisedTuningSpec + TuningSpec isTuningJob_TuningSpec `protobuf_oneof:"tuning_spec"` + // Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The display name of the + // [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + // 128 characters long and can consist of any UTF-8 characters. + TunedModelDisplayName string `protobuf:"bytes,2,opt,name=tuned_model_display_name,json=tunedModelDisplayName,proto3" json:"tuned_model_display_name,omitempty"` + // Optional. The description of the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. The detailed state of the job. + State JobState `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.aiplatform.v1.JobState" json:"state,omitempty"` + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + // entered the `JOB_STATE_RUNNING` state. + StartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // Output only. Time when the TuningJob entered any of the following + // [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + // `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + EndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + // updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + Error *status.Status `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"` + // Optional. The labels with user-defined metadata to organize + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + // such as [Model][google.cloud.aiplatform.v1.Model] and + // [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + Labels map[string]string `protobuf:"bytes,12,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. The Experiment associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + Experiment string `protobuf:"bytes,13,opt,name=experiment,proto3" json:"experiment,omitempty"` + // Output only. The tuned model resources assiociated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TunedModel *TunedModel `protobuf:"bytes,14,opt,name=tuned_model,json=tunedModel,proto3" json:"tuned_model,omitempty"` + // Output only. The tuning data statistics associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TuningDataStats *TuningDataStats `protobuf:"bytes,15,opt,name=tuning_data_stats,json=tuningDataStats,proto3" json:"tuning_data_stats,omitempty"` +} + +func (x *TuningJob) Reset() { + *x = TuningJob{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TuningJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TuningJob) ProtoMessage() {} + +func (x *TuningJob) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TuningJob.ProtoReflect.Descriptor instead. +func (*TuningJob) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{0} +} + +func (m *TuningJob) GetSourceModel() isTuningJob_SourceModel { + if m != nil { + return m.SourceModel + } + return nil +} + +func (x *TuningJob) GetBaseModel() string { + if x, ok := x.GetSourceModel().(*TuningJob_BaseModel); ok { + return x.BaseModel + } + return "" +} + +func (m *TuningJob) GetTuningSpec() isTuningJob_TuningSpec { + if m != nil { + return m.TuningSpec + } + return nil +} + +func (x *TuningJob) GetSupervisedTuningSpec() *SupervisedTuningSpec { + if x, ok := x.GetTuningSpec().(*TuningJob_SupervisedTuningSpec); ok { + return x.SupervisedTuningSpec + } + return nil +} + +func (x *TuningJob) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TuningJob) GetTunedModelDisplayName() string { + if x != nil { + return x.TunedModelDisplayName + } + return "" +} + +func (x *TuningJob) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *TuningJob) GetState() JobState { + if x != nil { + return x.State + } + return JobState_JOB_STATE_UNSPECIFIED +} + +func (x *TuningJob) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *TuningJob) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *TuningJob) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *TuningJob) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *TuningJob) GetError() *status.Status { + if x != nil { + return x.Error + } + return nil +} + +func (x *TuningJob) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *TuningJob) GetExperiment() string { + if x != nil { + return x.Experiment + } + return "" +} + +func (x *TuningJob) GetTunedModel() *TunedModel { + if x != nil { + return x.TunedModel + } + return nil +} + +func (x *TuningJob) GetTuningDataStats() *TuningDataStats { + if x != nil { + return x.TuningDataStats + } + return nil +} + +type isTuningJob_SourceModel interface { + isTuningJob_SourceModel() +} + +type TuningJob_BaseModel struct { + // Model name for tuning, e.g., "gemini-1.0-pro-002". + BaseModel string `protobuf:"bytes,4,opt,name=base_model,json=baseModel,proto3,oneof"` +} + +func (*TuningJob_BaseModel) isTuningJob_SourceModel() {} + +type isTuningJob_TuningSpec interface { + isTuningJob_TuningSpec() +} + +type TuningJob_SupervisedTuningSpec struct { + // Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec *SupervisedTuningSpec `protobuf:"bytes,5,opt,name=supervised_tuning_spec,json=supervisedTuningSpec,proto3,oneof"` +} + +func (*TuningJob_SupervisedTuningSpec) isTuningJob_TuningSpec() {} + +// The Model Registry Model and Online Prediction Endpoint assiociated with +// this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +type TunedModel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` + // Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` +} + +func (x *TunedModel) Reset() { + *x = TunedModel{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TunedModel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TunedModel) ProtoMessage() {} + +func (x *TunedModel) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TunedModel.ProtoReflect.Descriptor instead. +func (*TunedModel) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{1} +} + +func (x *TunedModel) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *TunedModel) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +// Dataset distribution for Supervised Tuning. +type SupervisedTuningDatasetDistribution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Sum of a given population of values. + Sum int64 `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"` + // Output only. The minimum of the population values. + Min float64 `protobuf:"fixed64,2,opt,name=min,proto3" json:"min,omitempty"` + // Output only. The maximum of the population values. + Max float64 `protobuf:"fixed64,3,opt,name=max,proto3" json:"max,omitempty"` + // Output only. The arithmetic mean of the values in the population. + Mean float64 `protobuf:"fixed64,4,opt,name=mean,proto3" json:"mean,omitempty"` + // Output only. The median of the values in the population. + Median float64 `protobuf:"fixed64,5,opt,name=median,proto3" json:"median,omitempty"` + // Output only. The 5th percentile of the values in the population. + P5 float64 `protobuf:"fixed64,6,opt,name=p5,proto3" json:"p5,omitempty"` + // Output only. The 95th percentile of the values in the population. + P95 float64 `protobuf:"fixed64,7,opt,name=p95,proto3" json:"p95,omitempty"` + // Output only. Defines the histogram bucket. + Buckets []*SupervisedTuningDatasetDistribution_DatasetBucket `protobuf:"bytes,8,rep,name=buckets,proto3" json:"buckets,omitempty"` +} + +func (x *SupervisedTuningDatasetDistribution) Reset() { + *x = SupervisedTuningDatasetDistribution{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupervisedTuningDatasetDistribution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupervisedTuningDatasetDistribution) ProtoMessage() {} + +func (x *SupervisedTuningDatasetDistribution) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SupervisedTuningDatasetDistribution.ProtoReflect.Descriptor instead. +func (*SupervisedTuningDatasetDistribution) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{2} +} + +func (x *SupervisedTuningDatasetDistribution) GetSum() int64 { + if x != nil { + return x.Sum + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetMin() float64 { + if x != nil { + return x.Min + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetMax() float64 { + if x != nil { + return x.Max + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetMean() float64 { + if x != nil { + return x.Mean + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetMedian() float64 { + if x != nil { + return x.Median + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetP5() float64 { + if x != nil { + return x.P5 + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetP95() float64 { + if x != nil { + return x.P95 + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution) GetBuckets() []*SupervisedTuningDatasetDistribution_DatasetBucket { + if x != nil { + return x.Buckets + } + return nil +} + +// Tuning data statistics for Supervised Tuning. +type SupervisedTuningDataStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Number of examples in the tuning dataset. + TuningDatasetExampleCount int64 `protobuf:"varint,1,opt,name=tuning_dataset_example_count,json=tuningDatasetExampleCount,proto3" json:"tuning_dataset_example_count,omitempty"` + // Output only. Number of tuning characters in the tuning dataset. + TotalTuningCharacterCount int64 `protobuf:"varint,2,opt,name=total_tuning_character_count,json=totalTuningCharacterCount,proto3" json:"total_tuning_character_count,omitempty"` + // Output only. Number of billable characters in the tuning dataset. + TotalBillableCharacterCount int64 `protobuf:"varint,3,opt,name=total_billable_character_count,json=totalBillableCharacterCount,proto3" json:"total_billable_character_count,omitempty"` + // Output only. Number of tuning steps for this Tuning Job. + TuningStepCount int64 `protobuf:"varint,4,opt,name=tuning_step_count,json=tuningStepCount,proto3" json:"tuning_step_count,omitempty"` + // Output only. Dataset distributions for the user input tokens. + UserInputTokenDistribution *SupervisedTuningDatasetDistribution `protobuf:"bytes,5,opt,name=user_input_token_distribution,json=userInputTokenDistribution,proto3" json:"user_input_token_distribution,omitempty"` + // Output only. Dataset distributions for the user output tokens. + UserOutputTokenDistribution *SupervisedTuningDatasetDistribution `protobuf:"bytes,6,opt,name=user_output_token_distribution,json=userOutputTokenDistribution,proto3" json:"user_output_token_distribution,omitempty"` + // Output only. Dataset distributions for the messages per example. + UserMessagePerExampleDistribution *SupervisedTuningDatasetDistribution `protobuf:"bytes,7,opt,name=user_message_per_example_distribution,json=userMessagePerExampleDistribution,proto3" json:"user_message_per_example_distribution,omitempty"` + // Output only. Sample user messages in the training dataset uri. + UserDatasetExamples []*Content `protobuf:"bytes,8,rep,name=user_dataset_examples,json=userDatasetExamples,proto3" json:"user_dataset_examples,omitempty"` +} + +func (x *SupervisedTuningDataStats) Reset() { + *x = SupervisedTuningDataStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupervisedTuningDataStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupervisedTuningDataStats) ProtoMessage() {} + +func (x *SupervisedTuningDataStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SupervisedTuningDataStats.ProtoReflect.Descriptor instead. +func (*SupervisedTuningDataStats) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{3} +} + +func (x *SupervisedTuningDataStats) GetTuningDatasetExampleCount() int64 { + if x != nil { + return x.TuningDatasetExampleCount + } + return 0 +} + +func (x *SupervisedTuningDataStats) GetTotalTuningCharacterCount() int64 { + if x != nil { + return x.TotalTuningCharacterCount + } + return 0 +} + +func (x *SupervisedTuningDataStats) GetTotalBillableCharacterCount() int64 { + if x != nil { + return x.TotalBillableCharacterCount + } + return 0 +} + +func (x *SupervisedTuningDataStats) GetTuningStepCount() int64 { + if x != nil { + return x.TuningStepCount + } + return 0 +} + +func (x *SupervisedTuningDataStats) GetUserInputTokenDistribution() *SupervisedTuningDatasetDistribution { + if x != nil { + return x.UserInputTokenDistribution + } + return nil +} + +func (x *SupervisedTuningDataStats) GetUserOutputTokenDistribution() *SupervisedTuningDatasetDistribution { + if x != nil { + return x.UserOutputTokenDistribution + } + return nil +} + +func (x *SupervisedTuningDataStats) GetUserMessagePerExampleDistribution() *SupervisedTuningDatasetDistribution { + if x != nil { + return x.UserMessagePerExampleDistribution + } + return nil +} + +func (x *SupervisedTuningDataStats) GetUserDatasetExamples() []*Content { + if x != nil { + return x.UserDatasetExamples + } + return nil +} + +// The tuning data statistic values for +// [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +type TuningDataStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to TuningDataStats: + // + // *TuningDataStats_SupervisedTuningDataStats + TuningDataStats isTuningDataStats_TuningDataStats `protobuf_oneof:"tuning_data_stats"` +} + +func (x *TuningDataStats) Reset() { + *x = TuningDataStats{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TuningDataStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TuningDataStats) ProtoMessage() {} + +func (x *TuningDataStats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TuningDataStats.ProtoReflect.Descriptor instead. +func (*TuningDataStats) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{4} +} + +func (m *TuningDataStats) GetTuningDataStats() isTuningDataStats_TuningDataStats { + if m != nil { + return m.TuningDataStats + } + return nil +} + +func (x *TuningDataStats) GetSupervisedTuningDataStats() *SupervisedTuningDataStats { + if x, ok := x.GetTuningDataStats().(*TuningDataStats_SupervisedTuningDataStats); ok { + return x.SupervisedTuningDataStats + } + return nil +} + +type isTuningDataStats_TuningDataStats interface { + isTuningDataStats_TuningDataStats() +} + +type TuningDataStats_SupervisedTuningDataStats struct { + // The SFT Tuning data stats. + SupervisedTuningDataStats *SupervisedTuningDataStats `protobuf:"bytes,1,opt,name=supervised_tuning_data_stats,json=supervisedTuningDataStats,proto3,oneof"` +} + +func (*TuningDataStats_SupervisedTuningDataStats) isTuningDataStats_TuningDataStats() {} + +// Hyperparameters for SFT. +type SupervisedHyperParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Number of training epoches for this tuning job. + EpochCount int64 `protobuf:"varint,1,opt,name=epoch_count,json=epochCount,proto3" json:"epoch_count,omitempty"` + // Optional. Learning rate multiplier for tuning. + LearningRateMultiplier float64 `protobuf:"fixed64,2,opt,name=learning_rate_multiplier,json=learningRateMultiplier,proto3" json:"learning_rate_multiplier,omitempty"` + // Optional. Adapter size for tuning. + AdapterSize SupervisedHyperParameters_AdapterSize `protobuf:"varint,3,opt,name=adapter_size,json=adapterSize,proto3,enum=google.cloud.aiplatform.v1.SupervisedHyperParameters_AdapterSize" json:"adapter_size,omitempty"` +} + +func (x *SupervisedHyperParameters) Reset() { + *x = SupervisedHyperParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupervisedHyperParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupervisedHyperParameters) ProtoMessage() {} + +func (x *SupervisedHyperParameters) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SupervisedHyperParameters.ProtoReflect.Descriptor instead. +func (*SupervisedHyperParameters) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{5} +} + +func (x *SupervisedHyperParameters) GetEpochCount() int64 { + if x != nil { + return x.EpochCount + } + return 0 +} + +func (x *SupervisedHyperParameters) GetLearningRateMultiplier() float64 { + if x != nil { + return x.LearningRateMultiplier + } + return 0 +} + +func (x *SupervisedHyperParameters) GetAdapterSize() SupervisedHyperParameters_AdapterSize { + if x != nil { + return x.AdapterSize + } + return SupervisedHyperParameters_ADAPTER_SIZE_UNSPECIFIED +} + +// Tuning Spec for Supervised Tuning. +type SupervisedTuningSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Cloud Storage path to file containing training dataset for + // tuning. + TrainingDatasetUri string `protobuf:"bytes,1,opt,name=training_dataset_uri,json=trainingDatasetUri,proto3" json:"training_dataset_uri,omitempty"` + // Optional. Cloud Storage path to file containing validation dataset for + // tuning. + ValidationDatasetUri string `protobuf:"bytes,2,opt,name=validation_dataset_uri,json=validationDatasetUri,proto3" json:"validation_dataset_uri,omitempty"` + // Optional. Hyperparameters for SFT. + HyperParameters *SupervisedHyperParameters `protobuf:"bytes,3,opt,name=hyper_parameters,json=hyperParameters,proto3" json:"hyper_parameters,omitempty"` +} + +func (x *SupervisedTuningSpec) Reset() { + *x = SupervisedTuningSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupervisedTuningSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupervisedTuningSpec) ProtoMessage() {} + +func (x *SupervisedTuningSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SupervisedTuningSpec.ProtoReflect.Descriptor instead. +func (*SupervisedTuningSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{6} +} + +func (x *SupervisedTuningSpec) GetTrainingDatasetUri() string { + if x != nil { + return x.TrainingDatasetUri + } + return "" +} + +func (x *SupervisedTuningSpec) GetValidationDatasetUri() string { + if x != nil { + return x.ValidationDatasetUri + } + return "" +} + +func (x *SupervisedTuningSpec) GetHyperParameters() *SupervisedHyperParameters { + if x != nil { + return x.HyperParameters + } + return nil +} + +// Dataset bucket used to create a histogram for the distribution given a +// population of values. +type SupervisedTuningDatasetDistribution_DatasetBucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Number of values in the bucket. + Count float64 `protobuf:"fixed64,1,opt,name=count,proto3" json:"count,omitempty"` + // Output only. Left bound of the bucket. + Left float64 `protobuf:"fixed64,2,opt,name=left,proto3" json:"left,omitempty"` + // Output only. Right bound of the bucket. + Right float64 `protobuf:"fixed64,3,opt,name=right,proto3" json:"right,omitempty"` +} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) Reset() { + *x = SupervisedTuningDatasetDistribution_DatasetBucket{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SupervisedTuningDatasetDistribution_DatasetBucket) ProtoMessage() {} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SupervisedTuningDatasetDistribution_DatasetBucket.ProtoReflect.Descriptor instead. +func (*SupervisedTuningDatasetDistribution_DatasetBucket) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) GetCount() float64 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) GetLeft() float64 { + if x != nil { + return x.Left + } + return 0 +} + +func (x *SupervisedTuningDatasetDistribution_DatasetBucket) GetRight() float64 { + if x != nil { + return x.Right + } + return 0 +} + +var File_google_cloud_aiplatform_v1_tuning_job_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1_tuning_job_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, + 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x6f, 0x62, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x09, 0x0a, 0x09, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x4a, 0x6f, 0x62, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x68, 0x0a, 0x16, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, + 0x65, 0x64, 0x5f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, + 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x48, 0x01, 0x52, 0x14, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, + 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x1a, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, + 0x08, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x18, 0x74, 0x75, + 0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x15, 0x74, 0x75, 0x6e, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, + 0x49, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x61, 0x69, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x74, 0x75, + 0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x6e, + 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x74, 0x75, + 0x6e, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x5c, 0x0a, 0x11, 0x74, 0x75, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x3a, 0x80, 0x01, 0xea, 0x41, 0x7d, 0x0a, 0x23, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x12, 0x3f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, + 0x2f, 0x7b, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x6f, 0x62, 0x7d, 0x2a, 0x0a, 0x74, + 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x73, 0x32, 0x09, 0x74, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x4a, 0x6f, 0x62, 0x42, 0x0e, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x22, 0x93, 0x01, 0x0a, 0x0a, 0x54, 0x75, 0x6e, 0x65, 0x64, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x12, 0x3d, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x27, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x12, 0x46, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2a, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x24, 0x0a, 0x22, 0x61, 0x69, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0x9a, 0x03, 0x0a, 0x23, 0x53, 0x75, + 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x15, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, + 0x15, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x17, 0x0a, 0x04, 0x6d, 0x65, 0x61, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6d, 0x65, 0x61, 0x6e, 0x12, + 0x1b, 0x0a, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x12, 0x13, 0x0a, 0x02, + 0x70, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x02, 0x70, + 0x35, 0x12, 0x15, 0x0a, 0x03, 0x70, 0x39, 0x35, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x03, 0x70, 0x39, 0x35, 0x12, 0x6c, 0x0a, 0x07, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, + 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x1a, 0x5e, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, + 0x74, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0xaf, 0x06, 0x0a, 0x19, 0x53, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x1c, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x19, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x45, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x1c, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, + 0x63, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x75, 0x6e, 0x69, + 0x6e, 0x67, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x48, 0x0a, 0x1e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6c, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x11, 0x74, 0x75, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x74, 0x75, 0x6e, 0x69, + 0x6e, 0x67, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x87, 0x01, 0x0a, 0x1d, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1a, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x89, 0x01, 0x0a, 0x1e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, + 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1b, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x96, 0x01, 0x0a, 0x25, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x21, 0x75, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x50, 0x65, 0x72, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x44, 0x69, + 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x15, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x13, 0x75, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x0f, 0x54, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x78, 0x0a, 0x1c, + 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x5f, 0x74, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x48, 0x00, 0x52, 0x19, 0x73, 0x75, 0x70, + 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x13, 0x0a, 0x11, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0xf8, 0x02, 0x0a, 0x19, + 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x48, 0x79, 0x70, 0x65, 0x72, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x65, 0x70, 0x6f, + 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x3d, 0x0a, 0x18, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x69, + 0x0a, 0x0c, 0x61, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x65, 0x64, 0x48, 0x79, 0x70, 0x65, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x41, 0x64, 0x61, 0x70, + 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x61, 0x64, + 0x61, 0x70, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x0b, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x44, 0x41, + 0x50, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x41, 0x50, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, + 0x11, 0x41, 0x44, 0x41, 0x50, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x46, 0x4f, + 0x55, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x44, 0x41, 0x50, 0x54, 0x45, 0x52, 0x5f, + 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x45, 0x49, 0x47, 0x48, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, + 0x41, 0x44, 0x41, 0x50, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x53, 0x49, 0x58, + 0x54, 0x45, 0x45, 0x4e, 0x10, 0x04, 0x22, 0xef, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x65, 0x64, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x35, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x12, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x55, 0x72, 0x69, 0x12, 0x39, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x14, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x55, 0x72, + 0x69, 0x12, 0x65, 0x0a, 0x10, 0x68, 0x79, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, + 0x73, 0x65, 0x64, 0x48, 0x79, 0x70, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x68, 0x79, 0x70, 0x65, 0x72, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0xcc, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x54, 0x75, 0x6e, + 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x61, 0x70, + 0x69, 0x76, 0x31, 0x2f, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, + 0x3b, 0x61, 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x70, 0x62, 0xaa, 0x02, 0x1a, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x49, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1d, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x49, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescData = file_google_cloud_aiplatform_v1_tuning_job_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1_tuning_job_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1_tuning_job_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_aiplatform_v1_tuning_job_proto_goTypes = []interface{}{ + (SupervisedHyperParameters_AdapterSize)(0), // 0: google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize + (*TuningJob)(nil), // 1: google.cloud.aiplatform.v1.TuningJob + (*TunedModel)(nil), // 2: google.cloud.aiplatform.v1.TunedModel + (*SupervisedTuningDatasetDistribution)(nil), // 3: google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + (*SupervisedTuningDataStats)(nil), // 4: google.cloud.aiplatform.v1.SupervisedTuningDataStats + (*TuningDataStats)(nil), // 5: google.cloud.aiplatform.v1.TuningDataStats + (*SupervisedHyperParameters)(nil), // 6: google.cloud.aiplatform.v1.SupervisedHyperParameters + (*SupervisedTuningSpec)(nil), // 7: google.cloud.aiplatform.v1.SupervisedTuningSpec + nil, // 8: google.cloud.aiplatform.v1.TuningJob.LabelsEntry + (*SupervisedTuningDatasetDistribution_DatasetBucket)(nil), // 9: google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + (JobState)(0), // 10: google.cloud.aiplatform.v1.JobState + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*status.Status)(nil), // 12: google.rpc.Status + (*Content)(nil), // 13: google.cloud.aiplatform.v1.Content +} +var file_google_cloud_aiplatform_v1_tuning_job_proto_depIdxs = []int32{ + 7, // 0: google.cloud.aiplatform.v1.TuningJob.supervised_tuning_spec:type_name -> google.cloud.aiplatform.v1.SupervisedTuningSpec + 10, // 1: google.cloud.aiplatform.v1.TuningJob.state:type_name -> google.cloud.aiplatform.v1.JobState + 11, // 2: google.cloud.aiplatform.v1.TuningJob.create_time:type_name -> google.protobuf.Timestamp + 11, // 3: google.cloud.aiplatform.v1.TuningJob.start_time:type_name -> google.protobuf.Timestamp + 11, // 4: google.cloud.aiplatform.v1.TuningJob.end_time:type_name -> google.protobuf.Timestamp + 11, // 5: google.cloud.aiplatform.v1.TuningJob.update_time:type_name -> google.protobuf.Timestamp + 12, // 6: google.cloud.aiplatform.v1.TuningJob.error:type_name -> google.rpc.Status + 8, // 7: google.cloud.aiplatform.v1.TuningJob.labels:type_name -> google.cloud.aiplatform.v1.TuningJob.LabelsEntry + 2, // 8: google.cloud.aiplatform.v1.TuningJob.tuned_model:type_name -> google.cloud.aiplatform.v1.TunedModel + 5, // 9: google.cloud.aiplatform.v1.TuningJob.tuning_data_stats:type_name -> google.cloud.aiplatform.v1.TuningDataStats + 9, // 10: google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.buckets:type_name -> google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + 3, // 11: google.cloud.aiplatform.v1.SupervisedTuningDataStats.user_input_token_distribution:type_name -> google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + 3, // 12: google.cloud.aiplatform.v1.SupervisedTuningDataStats.user_output_token_distribution:type_name -> google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + 3, // 13: google.cloud.aiplatform.v1.SupervisedTuningDataStats.user_message_per_example_distribution:type_name -> google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + 13, // 14: google.cloud.aiplatform.v1.SupervisedTuningDataStats.user_dataset_examples:type_name -> google.cloud.aiplatform.v1.Content + 4, // 15: google.cloud.aiplatform.v1.TuningDataStats.supervised_tuning_data_stats:type_name -> google.cloud.aiplatform.v1.SupervisedTuningDataStats + 0, // 16: google.cloud.aiplatform.v1.SupervisedHyperParameters.adapter_size:type_name -> google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize + 6, // 17: google.cloud.aiplatform.v1.SupervisedTuningSpec.hyper_parameters:type_name -> google.cloud.aiplatform.v1.SupervisedHyperParameters + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1_tuning_job_proto_init() } +func file_google_cloud_aiplatform_v1_tuning_job_proto_init() { + if File_google_cloud_aiplatform_v1_tuning_job_proto != nil { + return + } + file_google_cloud_aiplatform_v1_content_proto_init() + file_google_cloud_aiplatform_v1_job_state_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TuningJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TunedModel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupervisedTuningDatasetDistribution); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupervisedTuningDataStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TuningDataStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupervisedHyperParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupervisedTuningSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SupervisedTuningDatasetDistribution_DatasetBucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*TuningJob_BaseModel)(nil), + (*TuningJob_SupervisedTuningSpec)(nil), + } + file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*TuningDataStats_SupervisedTuningDataStats)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_aiplatform_v1_tuning_job_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_aiplatform_v1_tuning_job_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1_tuning_job_proto_depIdxs, + EnumInfos: file_google_cloud_aiplatform_v1_tuning_job_proto_enumTypes, + MessageInfos: file_google_cloud_aiplatform_v1_tuning_job_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1_tuning_job_proto = out.File + file_google_cloud_aiplatform_v1_tuning_job_proto_rawDesc = nil + file_google_cloud_aiplatform_v1_tuning_job_proto_goTypes = nil + file_google_cloud_aiplatform_v1_tuning_job_proto_depIdxs = nil +} diff --git a/aiplatform/apiv1/auxiliary.go b/aiplatform/apiv1/auxiliary.go index 0400daf3a1dc..3b421fa64f7d 100755 --- a/aiplatform/apiv1/auxiliary.go +++ b/aiplatform/apiv1/auxiliary.go @@ -7701,3 +7701,50 @@ func (it *TrialIterator) takeBuf() interface{} { it.items = nil return b } + +// TuningJobIterator manages a stream of *aiplatformpb.TuningJob. +type TuningJobIterator struct { + items []*aiplatformpb.TuningJob + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*aiplatformpb.TuningJob, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TuningJobIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *TuningJobIterator) Next() (*aiplatformpb.TuningJob, error) { + var item *aiplatformpb.TuningJob + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TuningJobIterator) bufLen() int { + return len(it.items) +} + +func (it *TuningJobIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/aiplatform/apiv1/gapic_metadata.json b/aiplatform/apiv1/gapic_metadata.json index 61deed4a899b..f6ae66c526bd 100644 --- a/aiplatform/apiv1/gapic_metadata.json +++ b/aiplatform/apiv1/gapic_metadata.json @@ -877,6 +877,85 @@ } } }, + "GenAiTuningService": { + "clients": { + "grpc": { + "libraryClient": "GenAiTuningClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CancelTuningJob": { + "methods": [ + "CancelTuningJob" + ] + }, + "CreateTuningJob": { + "methods": [ + "CreateTuningJob" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetTuningJob": { + "methods": [ + "GetTuningJob" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListTuningJobs": { + "methods": [ + "ListTuningJobs" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, "IndexEndpointService": { "clients": { "grpc": { diff --git a/aiplatform/apiv1/gen_ai_tuning_client.go b/aiplatform/apiv1/gen_ai_tuning_client.go new file mode 100755 index 000000000000..e0efb328e3f5 --- /dev/null +++ b/aiplatform/apiv1/gen_ai_tuning_client.go @@ -0,0 +1,643 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +package aiplatform + +import ( + "context" + "fmt" + "math" + "net/url" + + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" + iampb "cloud.google.com/go/iam/apiv1/iampb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" +) + +var newGenAiTuningClientHook clientHook + +// GenAiTuningCallOptions contains the retry settings for each method of GenAiTuningClient. +type GenAiTuningCallOptions struct { + CreateTuningJob []gax.CallOption + GetTuningJob []gax.CallOption + ListTuningJobs []gax.CallOption + CancelTuningJob []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption + WaitOperation []gax.CallOption +} + +func defaultGenAiTuningGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("aiplatform.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("aiplatform.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("aiplatform.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultGenAiTuningCallOptions() *GenAiTuningCallOptions { + return &GenAiTuningCallOptions{ + CreateTuningJob: []gax.CallOption{}, + GetTuningJob: []gax.CallOption{}, + ListTuningJobs: []gax.CallOption{}, + CancelTuningJob: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + WaitOperation: []gax.CallOption{}, + } +} + +// internalGenAiTuningClient is an interface that defines the methods available from Vertex AI API. +type internalGenAiTuningClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateTuningJob(context.Context, *aiplatformpb.CreateTuningJobRequest, ...gax.CallOption) (*aiplatformpb.TuningJob, error) + GetTuningJob(context.Context, *aiplatformpb.GetTuningJobRequest, ...gax.CallOption) (*aiplatformpb.TuningJob, error) + ListTuningJobs(context.Context, *aiplatformpb.ListTuningJobsRequest, ...gax.CallOption) *TuningJobIterator + CancelTuningJob(context.Context, *aiplatformpb.CancelTuningJobRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator + WaitOperation(context.Context, *longrunningpb.WaitOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) +} + +// GenAiTuningClient is a client for interacting with Vertex AI API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// A service for creating and managing GenAI Tuning Jobs. +type GenAiTuningClient struct { + // The internal transport-dependent client. + internalClient internalGenAiTuningClient + + // The call options for this service. + CallOptions *GenAiTuningCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *GenAiTuningClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *GenAiTuningClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *GenAiTuningClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateTuningJob creates a TuningJob. A created TuningJob right away will be attempted to +// be run. +func (c *GenAiTuningClient) CreateTuningJob(ctx context.Context, req *aiplatformpb.CreateTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.TuningJob, error) { + return c.internalClient.CreateTuningJob(ctx, req, opts...) +} + +// GetTuningJob gets a TuningJob. +func (c *GenAiTuningClient) GetTuningJob(ctx context.Context, req *aiplatformpb.GetTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.TuningJob, error) { + return c.internalClient.GetTuningJob(ctx, req, opts...) +} + +// ListTuningJobs lists TuningJobs in a Location. +func (c *GenAiTuningClient) ListTuningJobs(ctx context.Context, req *aiplatformpb.ListTuningJobsRequest, opts ...gax.CallOption) *TuningJobIterator { + return c.internalClient.ListTuningJobs(ctx, req, opts...) +} + +// CancelTuningJob cancels a TuningJob. +// Starts asynchronous cancellation on the TuningJob. The server makes a best +// effort to cancel the job, but success is not guaranteed. Clients can use +// GenAiTuningService.GetTuningJob +// or other methods to check whether the cancellation succeeded or whether the +// job completed despite cancellation. On successful cancellation, the +// TuningJob is not deleted; instead it becomes a job with a +// TuningJob.error value with a +// google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED, and +// TuningJob.state is set to +// CANCELLED. +func (c *GenAiTuningClient) CancelTuningJob(ctx context.Context, req *aiplatformpb.CancelTuningJobRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelTuningJob(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *GenAiTuningClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *GenAiTuningClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *GenAiTuningClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *GenAiTuningClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *GenAiTuningClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *GenAiTuningClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *GenAiTuningClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *GenAiTuningClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *GenAiTuningClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *GenAiTuningClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.WaitOperation(ctx, req, opts...) +} + +// genAiTuningGRPCClient is a client for interacting with Vertex AI API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type genAiTuningGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing GenAiTuningClient + CallOptions **GenAiTuningCallOptions + + // The gRPC API client. + genAiTuningClient aiplatformpb.GenAiTuningServiceClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewGenAiTuningClient creates a new gen ai tuning service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// A service for creating and managing GenAI Tuning Jobs. +func NewGenAiTuningClient(ctx context.Context, opts ...option.ClientOption) (*GenAiTuningClient, error) { + clientOpts := defaultGenAiTuningGRPCClientOptions() + if newGenAiTuningClientHook != nil { + hookOpts, err := newGenAiTuningClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := GenAiTuningClient{CallOptions: defaultGenAiTuningCallOptions()} + + c := &genAiTuningGRPCClient{ + connPool: connPool, + genAiTuningClient: aiplatformpb.NewGenAiTuningServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *genAiTuningGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *genAiTuningGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogHeaders = []string{"x-goog-api-client", gax.XGoogHeader(kv...)} +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *genAiTuningGRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *genAiTuningGRPCClient) CreateTuningJob(ctx context.Context, req *aiplatformpb.CreateTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.TuningJob, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateTuningJob[0:len((*c.CallOptions).CreateTuningJob):len((*c.CallOptions).CreateTuningJob)], opts...) + var resp *aiplatformpb.TuningJob + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.genAiTuningClient.CreateTuningJob(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) GetTuningJob(ctx context.Context, req *aiplatformpb.GetTuningJobRequest, opts ...gax.CallOption) (*aiplatformpb.TuningJob, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetTuningJob[0:len((*c.CallOptions).GetTuningJob):len((*c.CallOptions).GetTuningJob)], opts...) + var resp *aiplatformpb.TuningJob + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.genAiTuningClient.GetTuningJob(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) ListTuningJobs(ctx context.Context, req *aiplatformpb.ListTuningJobsRequest, opts ...gax.CallOption) *TuningJobIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListTuningJobs[0:len((*c.CallOptions).ListTuningJobs):len((*c.CallOptions).ListTuningJobs)], opts...) + it := &TuningJobIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTuningJobsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TuningJob, string, error) { + resp := &aiplatformpb.ListTuningJobsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.genAiTuningClient.ListTuningJobs(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTuningJobs(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *genAiTuningGRPCClient) CancelTuningJob(ctx context.Context, req *aiplatformpb.CancelTuningJobRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelTuningJob[0:len((*c.CallOptions).CancelTuningJob):len((*c.CallOptions).CancelTuningJob)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.genAiTuningClient.CancelTuningJob(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *genAiTuningGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *genAiTuningGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *genAiTuningGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *genAiTuningGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *genAiTuningGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *genAiTuningGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/aiplatform/apiv1/gen_ai_tuning_client_example_test.go b/aiplatform/apiv1/gen_ai_tuning_client_example_test.go new file mode 100644 index 000000000000..fee274faaf2c --- /dev/null +++ b/aiplatform/apiv1/gen_ai_tuning_client_example_test.go @@ -0,0 +1,425 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +package aiplatform_test + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" + iampb "cloud.google.com/go/iam/apiv1/iampb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewGenAiTuningClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleGenAiTuningClient_CancelTuningJob() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CancelTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelTuningJobRequest. + } + err = c.CancelTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGenAiTuningClient_CreateTuningJob() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTuningJobRequest. + } + resp, err := c.CreateTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_GetTuningJob() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTuningJobRequest. + } + resp, err := c.GetTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_ListTuningJobs() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTuningJobsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTuningJobsRequest. + } + it := c.ListTuningJobs(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*aiplatformpb.ListTuningJobsResponse) + } +} + +func ExampleGenAiTuningClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +func ExampleGenAiTuningClient_GetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_SetIamPolicy() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_TestIamPermissions() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGenAiTuningClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleGenAiTuningClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleGenAiTuningClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} + +func ExampleGenAiTuningClient_WaitOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.WaitOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest. + } + resp, err := c.WaitOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelOperation/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelOperation/main.go new file mode 100644 index 000000000000..bef31605a8e2 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_CancelOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_CancelOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelTuningJob/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelTuningJob/main.go new file mode 100644 index 000000000000..4a74c5fcc104 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CancelTuningJob/main.go @@ -0,0 +1,51 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CancelTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CancelTuningJobRequest. + } + err = c.CancelTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CreateTuningJob/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CreateTuningJob/main.go new file mode 100644 index 000000000000..6800ccbb7fb6 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/CreateTuningJob/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#CreateTuningJobRequest. + } + resp, err := c.CreateTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/DeleteOperation/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/DeleteOperation/main.go new file mode 100644 index 000000000000..144accd9ab0a --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/DeleteOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_DeleteOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_DeleteOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetIamPolicy/main.go new file mode 100644 index 000000000000..4184614bb8a5 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetIamPolicy/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + iampb "cloud.google.com/go/iam/apiv1/iampb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetLocation/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetLocation/main.go new file mode 100644 index 000000000000..a66f2459f479 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_GetLocation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_GetLocation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetOperation/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetOperation/main.go new file mode 100644 index 000000000000..d2ce43f60872 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_GetOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_GetOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetTuningJob/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetTuningJob/main.go new file mode 100644 index 000000000000..314f31b42827 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/GetTuningJob/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTuningJobRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#GetTuningJobRequest. + } + resp, err := c.GetTuningJob(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListLocations/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListLocations/main.go new file mode 100644 index 000000000000..12ce63d0cf9c --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_ListLocations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_ListLocations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListOperations/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListOperations/main.go new file mode 100644 index 000000000000..67b0f79efbbe --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListOperations/main.go @@ -0,0 +1,66 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_ListOperations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_ListOperations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListTuningJobs/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListTuningJobs/main.go new file mode 100644 index 000000000000..848e17104aa2 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/ListTuningJobs/main.go @@ -0,0 +1,66 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1/aiplatformpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTuningJobsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1/aiplatformpb#ListTuningJobsRequest. + } + it := c.ListTuningJobs(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*aiplatformpb.ListTuningJobsResponse) + } +} + +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/SetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/SetIamPolicy/main.go new file mode 100644 index 000000000000..a6305a457499 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/SetIamPolicy/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + iampb "cloud.google.com/go/iam/apiv1/iampb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/TestIamPermissions/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/TestIamPermissions/main.go new file mode 100644 index 000000000000..ad7b98b877d8 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/TestIamPermissions/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + iampb "cloud.google.com/go/iam/apiv1/iampb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/WaitOperation/main.go b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/WaitOperation/main.go new file mode 100644 index 000000000000..52a3e6254c8a --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/GenAiTuningClient/WaitOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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_gapic. DO NOT EDIT. + +// [START aiplatform_v1_generated_GenAiTuningService_WaitOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := aiplatform.NewGenAiTuningClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.WaitOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#WaitOperationRequest. + } + resp, err := c.WaitOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_GenAiTuningService_WaitOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json b/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json index 2825e8f4266c..13464271dfe8 100644 --- a/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/internal/generated/snippets/aiplatform/apiv1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -7309,6 +7309,647 @@ } ] }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_CancelOperation_sync", + "title": "aiplatform CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "GenAiTuningClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync", + "title": "aiplatform CancelTuningJob Sample", + "description": "CancelTuningJob cancels a TuningJob.\nStarts asynchronous cancellation on the TuningJob. The server makes a best\neffort to cancel the job, but success is not guaranteed. Clients can use\n[GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]\nor other methods to check whether the cancellation succeeded or whether the\njob completed despite cancellation. On successful cancellation, the\nTuningJob is not deleted; instead it becomes a job with a\n[TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a\n[google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to\n`Code.CANCELLED`, and\n[TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to\n`CANCELLED`.", + "file": "GenAiTuningClient/CancelTuningJob/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.CancelTuningJob", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.CancelTuningJobRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "CancelTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService.CancelTuningJob", + "service": { + "shortName": "GenAiTuningService", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync", + "title": "aiplatform CreateTuningJob Sample", + "description": "CreateTuningJob creates a TuningJob. A created TuningJob right away will be attempted to\nbe run.", + "file": "GenAiTuningClient/CreateTuningJob/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.CreateTuningJob", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.CreateTuningJobRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.TuningJob", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "CreateTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService.CreateTuningJob", + "service": { + "shortName": "GenAiTuningService", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_DeleteOperation_sync", + "title": "aiplatform DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "GenAiTuningClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.longrunning.Operations.DeleteOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync", + "title": "aiplatform GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "GenAiTuningClient/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_GetLocation_sync", + "title": "aiplatform GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "GenAiTuningClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_GetOperation_sync", + "title": "aiplatform GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "GenAiTuningClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync", + "title": "aiplatform GetTuningJob Sample", + "description": "GetTuningJob gets a TuningJob.", + "file": "GenAiTuningClient/GetTuningJob/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.GetTuningJob", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.GetTuningJobRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.TuningJob", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "GetTuningJob", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob", + "service": { + "shortName": "GenAiTuningService", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_ListLocations_sync", + "title": "aiplatform ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "GenAiTuningClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_ListOperations_sync", + "title": "aiplatform ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "GenAiTuningClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync", + "title": "aiplatform ListTuningJobs Sample", + "description": "ListTuningJobs lists TuningJobs in a Location.", + "file": "GenAiTuningClient/ListTuningJobs/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListTuningJobs", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.ListTuningJobs", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.ListTuningJobsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "TuningJobIterator", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "ListTuningJobs", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService.ListTuningJobs", + "service": { + "shortName": "GenAiTuningService", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync", + "title": "aiplatform SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", + "file": "GenAiTuningClient/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync", + "title": "aiplatform TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", + "file": "GenAiTuningClient/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.TestIamPermissionsResponse", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1_generated_GenAiTuningService_WaitOperation_sync", + "title": "aiplatform WaitOperation Sample", + "description": "WaitOperation is a utility method from google.longrunning.Operations.", + "file": "GenAiTuningClient/WaitOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "WaitOperation", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient.WaitOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.WaitOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "GenAiTuningClient", + "fullName": "google.cloud.aiplatform.v1.GenAiTuningClient" + }, + "method": { + "shortName": "WaitOperation", + "fullName": "google.longrunning.Operations.WaitOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, { "regionTag": "aiplatform_v1_generated_IndexEndpointService_CancelOperation_sync", "title": "aiplatform CancelOperation Sample",