diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go new file mode 100755 index 00000000000..08b309b85f4 --- /dev/null +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine.pb.go @@ -0,0 +1,468 @@ +// Copyright 2023 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/v1beta1/reasoning_engine.proto + +package aiplatformpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + 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) +) + +// ReasoningEngine configurations +type ReasoningEngineSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. User provided package spec of the ReasoningEngine. + PackageSpec *ReasoningEngineSpec_PackageSpec `protobuf:"bytes,2,opt,name=package_spec,json=packageSpec,proto3" json:"package_spec,omitempty"` + // Optional. Declarations for object class methods. + ClassMethods []*structpb.Struct `protobuf:"bytes,3,rep,name=class_methods,json=classMethods,proto3" json:"class_methods,omitempty"` +} + +func (x *ReasoningEngineSpec) Reset() { + *x = ReasoningEngineSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReasoningEngineSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReasoningEngineSpec) ProtoMessage() {} + +func (x *ReasoningEngineSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 ReasoningEngineSpec.ProtoReflect.Descriptor instead. +func (*ReasoningEngineSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescGZIP(), []int{0} +} + +func (x *ReasoningEngineSpec) GetPackageSpec() *ReasoningEngineSpec_PackageSpec { + if x != nil { + return x.PackageSpec + } + return nil +} + +func (x *ReasoningEngineSpec) GetClassMethods() []*structpb.Struct { + if x != nil { + return x.ClassMethods + } + return nil +} + +// ReasoningEngine provides customized orchestration over extensions and tools. +type ReasoningEngine struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The resource name of the ReasoningEngine. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The display name of the ReasoningEngine. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. The description of the ReasoningEngine. + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + // Required. Configurations of the ReasoningEngine + Spec *ReasoningEngineSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + // Output only. Timestamp when this ReasoningEngine was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Timestamp when this ReasoningEngine was most recently updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + Etag string `protobuf:"bytes,6,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *ReasoningEngine) Reset() { + *x = ReasoningEngine{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReasoningEngine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReasoningEngine) ProtoMessage() {} + +func (x *ReasoningEngine) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 ReasoningEngine.ProtoReflect.Descriptor instead. +func (*ReasoningEngine) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescGZIP(), []int{1} +} + +func (x *ReasoningEngine) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ReasoningEngine) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ReasoningEngine) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ReasoningEngine) GetSpec() *ReasoningEngineSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *ReasoningEngine) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ReasoningEngine) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *ReasoningEngine) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// User provided package spec like pickled object and package requirements. +type ReasoningEngineSpec_PackageSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The Cloud Storage URI of the pickled python object. + PickleObjectGcsUri string `protobuf:"bytes,1,opt,name=pickle_object_gcs_uri,json=pickleObjectGcsUri,proto3" json:"pickle_object_gcs_uri,omitempty"` + // Optional. The Cloud Storage URI of the dependency files in tar.gz format. + DependencyFilesGcsUri string `protobuf:"bytes,2,opt,name=dependency_files_gcs_uri,json=dependencyFilesGcsUri,proto3" json:"dependency_files_gcs_uri,omitempty"` + // Optional. The Cloud Storage URI of the `requirements.txt` file + RequirementsGcsUri string `protobuf:"bytes,3,opt,name=requirements_gcs_uri,json=requirementsGcsUri,proto3" json:"requirements_gcs_uri,omitempty"` + // Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11. + // If not specified, default value is 3.10. + PythonVersion string `protobuf:"bytes,4,opt,name=python_version,json=pythonVersion,proto3" json:"python_version,omitempty"` +} + +func (x *ReasoningEngineSpec_PackageSpec) Reset() { + *x = ReasoningEngineSpec_PackageSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReasoningEngineSpec_PackageSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReasoningEngineSpec_PackageSpec) ProtoMessage() {} + +func (x *ReasoningEngineSpec_PackageSpec) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 ReasoningEngineSpec_PackageSpec.ProtoReflect.Descriptor instead. +func (*ReasoningEngineSpec_PackageSpec) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ReasoningEngineSpec_PackageSpec) GetPickleObjectGcsUri() string { + if x != nil { + return x.PickleObjectGcsUri + } + return "" +} + +func (x *ReasoningEngineSpec_PackageSpec) GetDependencyFilesGcsUri() string { + if x != nil { + return x.DependencyFilesGcsUri + } + return "" +} + +func (x *ReasoningEngineSpec_PackageSpec) GetRequirementsGcsUri() string { + if x != nil { + return x.RequirementsGcsUri + } + return "" +} + +func (x *ReasoningEngineSpec_PackageSpec) GetPythonVersion() string { + if x != nil { + return x.PythonVersion + } + return "" +} + +var File_google_cloud_aiplatform_v1beta1_reasoning_engine_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDesc = []byte{ + 0x0a, 0x36, 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, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 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, 0x62, 0x65, 0x74, 0x61, 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, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 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, 0x22, 0xab, 0x03, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x68, 0x0a, 0x0c, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 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, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x1a, 0xe6, 0x01, 0x0a, 0x0b, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x15, 0x70, 0x69, 0x63, + 0x6b, 0x6c, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x67, 0x63, 0x73, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x70, + 0x69, 0x63, 0x6b, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x47, 0x63, 0x73, 0x55, 0x72, + 0x69, 0x12, 0x3c, 0x0a, 0x18, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x67, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x47, 0x63, 0x73, 0x55, 0x72, 0x69, 0x12, + 0x35, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, + 0x67, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x47, 0x63, 0x73, 0x55, 0x72, 0x69, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x87, 0x04, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 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, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, + 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 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, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, + 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, 0x17, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x3a, 0x9f, 0x01, 0xea, 0x41, 0x9b, + 0x01, 0x0a, 0x29, 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, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x4b, 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, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x7d, 0x2a, 0x10, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x32, 0x0f, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x42, 0xeb, 0x01, 0x0a, + 0x23, 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, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x14, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 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, 0x62, 0x65, 0x74, 0x61, 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, 0x1f, 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, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x1f, 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, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 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, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescData = file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_goTypes = []interface{}{ + (*ReasoningEngineSpec)(nil), // 0: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + (*ReasoningEngine)(nil), // 1: google.cloud.aiplatform.v1beta1.ReasoningEngine + (*ReasoningEngineSpec_PackageSpec)(nil), // 2: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + (*structpb.Struct)(nil), // 3: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_depIdxs = []int32{ + 2, // 0: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.package_spec:type_name -> google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + 3, // 1: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.class_methods:type_name -> google.protobuf.Struct + 0, // 2: google.cloud.aiplatform.v1beta1.ReasoningEngine.spec:type_name -> google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + 4, // 3: google.cloud.aiplatform.v1beta1.ReasoningEngine.create_time:type_name -> google.protobuf.Timestamp + 4, // 4: google.cloud.aiplatform.v1beta1.ReasoningEngine.update_time:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_init() } +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_init() { + if File_google_cloud_aiplatform_v1beta1_reasoning_engine_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReasoningEngineSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReasoningEngine); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReasoningEngineSpec_PackageSpec); 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_v1beta1_reasoning_engine_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_depIdxs, + MessageInfos: file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1beta1_reasoning_engine_proto = out.File + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_rawDesc = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_goTypes = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_depIdxs = nil +} diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go new file mode 100755 index 00000000000..78645ee3abe --- /dev/null +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_execution_service.pb.go @@ -0,0 +1,390 @@ +// Copyright 2023 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/v1beta1/reasoning_engine_execution_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" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for [ReasoningEngineExecutionService.Query][]. +type QueryReasoningEngineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the ReasoningEngine resource to use. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Input content provided by users in JSON object format. Examples + // include text query, function calling parameters, media bytes, etc. + Input *structpb.Struct `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` +} + +func (x *QueryReasoningEngineRequest) Reset() { + *x = QueryReasoningEngineRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryReasoningEngineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryReasoningEngineRequest) ProtoMessage() {} + +func (x *QueryReasoningEngineRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_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 QueryReasoningEngineRequest.ProtoReflect.Descriptor instead. +func (*QueryReasoningEngineRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryReasoningEngineRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *QueryReasoningEngineRequest) GetInput() *structpb.Struct { + if x != nil { + return x.Input + } + return nil +} + +// Response message for [ReasoningEngineExecutionService.Query][] +type QueryReasoningEngineResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Response provided by users in JSON object format. + Output *structpb.Value `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *QueryReasoningEngineResponse) Reset() { + *x = QueryReasoningEngineResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryReasoningEngineResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryReasoningEngineResponse) ProtoMessage() {} + +func (x *QueryReasoningEngineResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_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 QueryReasoningEngineResponse.ProtoReflect.Descriptor instead. +func (*QueryReasoningEngineResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryReasoningEngineResponse) GetOutput() *structpb.Value { + if x != nil { + return x.Output + } + return nil +} + +var File_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDesc = []byte{ + 0x0a, 0x48, 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, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 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, 0x62, 0x65, 0x74, 0x61, 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, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a, + 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x2b, 0x0a, 0x29, 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, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x4e, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x32, 0xd2, 0x02, 0x0a, 0x1f, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdf, 0x01, 0x0a, 0x14, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x12, 0x3c, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3d, 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, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x3a, 0x01, 0x2a, 0x22, 0x3f, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 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, 0xfb, 0x01, 0x0a, + 0x23, 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, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x42, 0x24, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 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, 0x62, 0x65, 0x74, 0x61, 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, 0x1f, 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, 0x42, 0x65, + 0x74, 0x61, 0x31, 0xca, 0x02, 0x1f, 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, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 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, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescData = file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_goTypes = []interface{}{ + (*QueryReasoningEngineRequest)(nil), // 0: google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + (*QueryReasoningEngineResponse)(nil), // 1: google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + (*structpb.Struct)(nil), // 2: google.protobuf.Struct + (*structpb.Value)(nil), // 3: google.protobuf.Value +} +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_depIdxs = []int32{ + 2, // 0: google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.input:type_name -> google.protobuf.Struct + 3, // 1: google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.output:type_name -> google.protobuf.Value + 0, // 2: google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine:input_type -> google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + 1, // 3: google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine:output_type -> google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] 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_v1beta1_reasoning_engine_execution_service_proto_init() } +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_init() { + if File_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryReasoningEngineRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryReasoningEngineResponse); 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_v1beta1_reasoning_engine_execution_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_depIdxs, + MessageInfos: file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto = out.File + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_rawDesc = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_service_proto_goTypes = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_execution_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 + +// ReasoningEngineExecutionServiceClient is the client API for ReasoningEngineExecutionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ReasoningEngineExecutionServiceClient interface { + // Queries using a reasoning engine. + QueryReasoningEngine(ctx context.Context, in *QueryReasoningEngineRequest, opts ...grpc.CallOption) (*QueryReasoningEngineResponse, error) +} + +type reasoningEngineExecutionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReasoningEngineExecutionServiceClient(cc grpc.ClientConnInterface) ReasoningEngineExecutionServiceClient { + return &reasoningEngineExecutionServiceClient{cc} +} + +func (c *reasoningEngineExecutionServiceClient) QueryReasoningEngine(ctx context.Context, in *QueryReasoningEngineRequest, opts ...grpc.CallOption) (*QueryReasoningEngineResponse, error) { + out := new(QueryReasoningEngineResponse) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService/QueryReasoningEngine", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReasoningEngineExecutionServiceServer is the server API for ReasoningEngineExecutionService service. +type ReasoningEngineExecutionServiceServer interface { + // Queries using a reasoning engine. + QueryReasoningEngine(context.Context, *QueryReasoningEngineRequest) (*QueryReasoningEngineResponse, error) +} + +// UnimplementedReasoningEngineExecutionServiceServer can be embedded to have forward compatible implementations. +type UnimplementedReasoningEngineExecutionServiceServer struct { +} + +func (*UnimplementedReasoningEngineExecutionServiceServer) QueryReasoningEngine(context.Context, *QueryReasoningEngineRequest) (*QueryReasoningEngineResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryReasoningEngine not implemented") +} + +func RegisterReasoningEngineExecutionServiceServer(s *grpc.Server, srv ReasoningEngineExecutionServiceServer) { + s.RegisterService(&_ReasoningEngineExecutionService_serviceDesc, srv) +} + +func _ReasoningEngineExecutionService_QueryReasoningEngine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryReasoningEngineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReasoningEngineExecutionServiceServer).QueryReasoningEngine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService/QueryReasoningEngine", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReasoningEngineExecutionServiceServer).QueryReasoningEngine(ctx, req.(*QueryReasoningEngineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ReasoningEngineExecutionService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService", + HandlerType: (*ReasoningEngineExecutionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryReasoningEngine", + Handler: _ReasoningEngineExecutionService_QueryReasoningEngine_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", +} diff --git a/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go new file mode 100755 index 00000000000..76d4d27300e --- /dev/null +++ b/aiplatform/apiv1beta1/aiplatformpb/reasoning_engine_service.pb.go @@ -0,0 +1,908 @@ +// Copyright 2023 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/v1beta1/reasoning_engine_service.proto + +package aiplatformpb + +import ( + context "context" + reflect "reflect" + sync "sync" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + _ "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" + _ "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 +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine]. +type CreateReasoningEngineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Location to create the ReasoningEngine + // in. Format: `projects/{project}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The ReasoningEngine to create. + ReasoningEngine *ReasoningEngine `protobuf:"bytes,2,opt,name=reasoning_engine,json=reasoningEngine,proto3" json:"reasoning_engine,omitempty"` +} + +func (x *CreateReasoningEngineRequest) Reset() { + *x = CreateReasoningEngineRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReasoningEngineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReasoningEngineRequest) ProtoMessage() {} + +func (x *CreateReasoningEngineRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 CreateReasoningEngineRequest.ProtoReflect.Descriptor instead. +func (*CreateReasoningEngineRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateReasoningEngineRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateReasoningEngineRequest) GetReasoningEngine() *ReasoningEngine { + if x != nil { + return x.ReasoningEngine + } + return nil +} + +// Details of +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine] +// operation. +type CreateReasoningEngineOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The common part of the operation metadata. + GenericMetadata *GenericOperationMetadata `protobuf:"bytes,1,opt,name=generic_metadata,json=genericMetadata,proto3" json:"generic_metadata,omitempty"` +} + +func (x *CreateReasoningEngineOperationMetadata) Reset() { + *x = CreateReasoningEngineOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateReasoningEngineOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReasoningEngineOperationMetadata) ProtoMessage() {} + +func (x *CreateReasoningEngineOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 CreateReasoningEngineOperationMetadata.ProtoReflect.Descriptor instead. +func (*CreateReasoningEngineOperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateReasoningEngineOperationMetadata) GetGenericMetadata() *GenericOperationMetadata { + if x != nil { + return x.GenericMetadata + } + return nil +} + +// Request message for +// [ReasoningEngineService.GetReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine]. +type GetReasoningEngineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the ReasoningEngine resource. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetReasoningEngineRequest) Reset() { + *x = GetReasoningEngineRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReasoningEngineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReasoningEngineRequest) ProtoMessage() {} + +func (x *GetReasoningEngineRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 GetReasoningEngineRequest.ProtoReflect.Descriptor instead. +func (*GetReasoningEngineRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{2} +} + +func (x *GetReasoningEngineRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines]. +type ListReasoningEnginesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Location to list the ReasoningEngines + // from. Format: `projects/{project}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. The standard list filter. + // More detail in [AIP-160](https://google.aip.dev/160). + 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. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListReasoningEnginesRequest) Reset() { + *x = ListReasoningEnginesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReasoningEnginesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReasoningEnginesRequest) ProtoMessage() {} + +func (x *ListReasoningEnginesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 ListReasoningEnginesRequest.ProtoReflect.Descriptor instead. +func (*ListReasoningEnginesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListReasoningEnginesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListReasoningEnginesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListReasoningEnginesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListReasoningEnginesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines] +type ListReasoningEnginesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of ReasoningEngines in the requested page. + ReasoningEngines []*ReasoningEngine `protobuf:"bytes,1,rep,name=reasoning_engines,json=reasoningEngines,proto3" json:"reasoning_engines,omitempty"` + // A token to retrieve the next page of results. + // Pass to + // [ListReasoningEnginesRequest.page_token][google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.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 *ListReasoningEnginesResponse) Reset() { + *x = ListReasoningEnginesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListReasoningEnginesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListReasoningEnginesResponse) ProtoMessage() {} + +func (x *ListReasoningEnginesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 ListReasoningEnginesResponse.ProtoReflect.Descriptor instead. +func (*ListReasoningEnginesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListReasoningEnginesResponse) GetReasoningEngines() []*ReasoningEngine { + if x != nil { + return x.ReasoningEngines + } + return nil +} + +func (x *ListReasoningEnginesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Request message for +// [ReasoningEngineService.DeleteReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine]. +type DeleteReasoningEngineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the ReasoningEngine resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteReasoningEngineRequest) Reset() { + *x = DeleteReasoningEngineRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteReasoningEngineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReasoningEngineRequest) ProtoMessage() {} + +func (x *DeleteReasoningEngineRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_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 DeleteReasoningEngineRequest.ProtoReflect.Descriptor instead. +func (*DeleteReasoningEngineRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteReasoningEngineRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDesc = []byte{ + 0x0a, 0x3e, 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, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1f, 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, 0x62, 0x65, 0x74, 0x61, + 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, 0x2f, 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, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, + 0xc3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 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, 0x60, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x64, 0x0a, 0x10, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x62, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, 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, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x1b, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 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, 0xa5, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x10, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 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, 0x65, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2b, 0x0a, 0x29, + 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, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, + 0xb1, 0x08, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa1, 0x02, 0x0a, 0x15, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x67, 0x69, 0x6e, 0x65, 0x12, 0x3d, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xa9, 0x01, 0xca, 0x41, 0x39, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x26, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xda, 0x41, 0x17, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x4d, 0x3a, 0x10, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x22, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x12, 0xcc, + 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x3a, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 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, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x22, 0x48, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xdf, 0x01, + 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x3c, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x4a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 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, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, 0x12, + 0xf2, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x3d, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7b, 0xca, 0x41, 0x30, 0x0a, 0x15, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 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, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 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, 0xf2, 0x01, 0x0a, 0x23, 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, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x1b, 0x52, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 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, + 0x62, 0x65, 0x74, 0x61, 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, 0x1f, 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, 0x42, 0x65, 0x74, 0x61, + 0x31, 0xca, 0x02, 0x1f, 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, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xea, 0x02, 0x22, 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, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescData = file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_goTypes = []interface{}{ + (*CreateReasoningEngineRequest)(nil), // 0: google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + (*CreateReasoningEngineOperationMetadata)(nil), // 1: google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + (*GetReasoningEngineRequest)(nil), // 2: google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + (*ListReasoningEnginesRequest)(nil), // 3: google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + (*ListReasoningEnginesResponse)(nil), // 4: google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + (*DeleteReasoningEngineRequest)(nil), // 5: google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + (*ReasoningEngine)(nil), // 6: google.cloud.aiplatform.v1beta1.ReasoningEngine + (*GenericOperationMetadata)(nil), // 7: google.cloud.aiplatform.v1beta1.GenericOperationMetadata + (*longrunningpb.Operation)(nil), // 8: google.longrunning.Operation +} +var file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_depIdxs = []int32{ + 6, // 0: google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.reasoning_engine:type_name -> google.cloud.aiplatform.v1beta1.ReasoningEngine + 7, // 1: google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.generic_metadata:type_name -> google.cloud.aiplatform.v1beta1.GenericOperationMetadata + 6, // 2: google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.reasoning_engines:type_name -> google.cloud.aiplatform.v1beta1.ReasoningEngine + 0, // 3: google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine:input_type -> google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + 2, // 4: google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine:input_type -> google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + 3, // 5: google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines:input_type -> google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + 5, // 6: google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine:input_type -> google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + 8, // 7: google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine:output_type -> google.longrunning.Operation + 6, // 8: google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine:output_type -> google.cloud.aiplatform.v1beta1.ReasoningEngine + 4, // 9: google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines:output_type -> google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + 8, // 10: google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine:output_type -> google.longrunning.Operation + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_init() } +func file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_init() { + if File_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto != nil { + return + } + file_google_cloud_aiplatform_v1beta1_operation_proto_init() + file_google_cloud_aiplatform_v1beta1_reasoning_engine_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReasoningEngineRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateReasoningEngineOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetReasoningEngineRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReasoningEnginesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListReasoningEnginesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteReasoningEngineRequest); 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_v1beta1_reasoning_engine_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_depIdxs, + MessageInfos: file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto = out.File + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_rawDesc = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_service_proto_goTypes = nil + file_google_cloud_aiplatform_v1beta1_reasoning_engine_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 + +// ReasoningEngineServiceClient is the client API for ReasoningEngineService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ReasoningEngineServiceClient interface { + // Creates a reasoning engine. + CreateReasoningEngine(ctx context.Context, in *CreateReasoningEngineRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Gets a reasoning engine. + GetReasoningEngine(ctx context.Context, in *GetReasoningEngineRequest, opts ...grpc.CallOption) (*ReasoningEngine, error) + // Lists reasoning engines in a location. + ListReasoningEngines(ctx context.Context, in *ListReasoningEnginesRequest, opts ...grpc.CallOption) (*ListReasoningEnginesResponse, error) + // Deletes a reasoning engine. + DeleteReasoningEngine(ctx context.Context, in *DeleteReasoningEngineRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) +} + +type reasoningEngineServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewReasoningEngineServiceClient(cc grpc.ClientConnInterface) ReasoningEngineServiceClient { + return &reasoningEngineServiceClient{cc} +} + +func (c *reasoningEngineServiceClient) CreateReasoningEngine(ctx context.Context, in *CreateReasoningEngineRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/CreateReasoningEngine", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reasoningEngineServiceClient) GetReasoningEngine(ctx context.Context, in *GetReasoningEngineRequest, opts ...grpc.CallOption) (*ReasoningEngine, error) { + out := new(ReasoningEngine) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/GetReasoningEngine", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reasoningEngineServiceClient) ListReasoningEngines(ctx context.Context, in *ListReasoningEnginesRequest, opts ...grpc.CallOption) (*ListReasoningEnginesResponse, error) { + out := new(ListReasoningEnginesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/ListReasoningEngines", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *reasoningEngineServiceClient) DeleteReasoningEngine(ctx context.Context, in *DeleteReasoningEngineRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/DeleteReasoningEngine", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReasoningEngineServiceServer is the server API for ReasoningEngineService service. +type ReasoningEngineServiceServer interface { + // Creates a reasoning engine. + CreateReasoningEngine(context.Context, *CreateReasoningEngineRequest) (*longrunningpb.Operation, error) + // Gets a reasoning engine. + GetReasoningEngine(context.Context, *GetReasoningEngineRequest) (*ReasoningEngine, error) + // Lists reasoning engines in a location. + ListReasoningEngines(context.Context, *ListReasoningEnginesRequest) (*ListReasoningEnginesResponse, error) + // Deletes a reasoning engine. + DeleteReasoningEngine(context.Context, *DeleteReasoningEngineRequest) (*longrunningpb.Operation, error) +} + +// UnimplementedReasoningEngineServiceServer can be embedded to have forward compatible implementations. +type UnimplementedReasoningEngineServiceServer struct { +} + +func (*UnimplementedReasoningEngineServiceServer) CreateReasoningEngine(context.Context, *CreateReasoningEngineRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateReasoningEngine not implemented") +} +func (*UnimplementedReasoningEngineServiceServer) GetReasoningEngine(context.Context, *GetReasoningEngineRequest) (*ReasoningEngine, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetReasoningEngine not implemented") +} +func (*UnimplementedReasoningEngineServiceServer) ListReasoningEngines(context.Context, *ListReasoningEnginesRequest) (*ListReasoningEnginesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListReasoningEngines not implemented") +} +func (*UnimplementedReasoningEngineServiceServer) DeleteReasoningEngine(context.Context, *DeleteReasoningEngineRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteReasoningEngine not implemented") +} + +func RegisterReasoningEngineServiceServer(s *grpc.Server, srv ReasoningEngineServiceServer) { + s.RegisterService(&_ReasoningEngineService_serviceDesc, srv) +} + +func _ReasoningEngineService_CreateReasoningEngine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateReasoningEngineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReasoningEngineServiceServer).CreateReasoningEngine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/CreateReasoningEngine", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReasoningEngineServiceServer).CreateReasoningEngine(ctx, req.(*CreateReasoningEngineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReasoningEngineService_GetReasoningEngine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReasoningEngineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReasoningEngineServiceServer).GetReasoningEngine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/GetReasoningEngine", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReasoningEngineServiceServer).GetReasoningEngine(ctx, req.(*GetReasoningEngineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReasoningEngineService_ListReasoningEngines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListReasoningEnginesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReasoningEngineServiceServer).ListReasoningEngines(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/ListReasoningEngines", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReasoningEngineServiceServer).ListReasoningEngines(ctx, req.(*ListReasoningEnginesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ReasoningEngineService_DeleteReasoningEngine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReasoningEngineRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReasoningEngineServiceServer).DeleteReasoningEngine(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ReasoningEngineService/DeleteReasoningEngine", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReasoningEngineServiceServer).DeleteReasoningEngine(ctx, req.(*DeleteReasoningEngineRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ReasoningEngineService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.aiplatform.v1beta1.ReasoningEngineService", + HandlerType: (*ReasoningEngineServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateReasoningEngine", + Handler: _ReasoningEngineService_CreateReasoningEngine_Handler, + }, + { + MethodName: "GetReasoningEngine", + Handler: _ReasoningEngineService_GetReasoningEngine_Handler, + }, + { + MethodName: "ListReasoningEngines", + Handler: _ReasoningEngineService_ListReasoningEngines_Handler, + }, + { + MethodName: "DeleteReasoningEngine", + Handler: _ReasoningEngineService_DeleteReasoningEngine_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", +} diff --git a/aiplatform/apiv1beta1/auxiliary.go b/aiplatform/apiv1beta1/auxiliary.go index 34731546118..60cfdbcc37b 100755 --- a/aiplatform/apiv1beta1/auxiliary.go +++ b/aiplatform/apiv1beta1/auxiliary.go @@ -1372,6 +1372,70 @@ func (op *CreatePersistentResourceOperation) Name() string { return op.lro.Name() } +// CreateReasoningEngineOperation manages a long-running operation from CreateReasoningEngine. +type CreateReasoningEngineOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateReasoningEngineOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ReasoningEngine, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.ReasoningEngine + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateReasoningEngineOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.ReasoningEngine, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp aiplatformpb.ReasoningEngine + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateReasoningEngineOperation) Metadata() (*aiplatformpb.CreateReasoningEngineOperationMetadata, error) { + var meta aiplatformpb.CreateReasoningEngineOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateReasoningEngineOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateReasoningEngineOperation) Name() string { + return op.lro.Name() +} + // CreateSpecialistPoolOperation manages a long-running operation from CreateSpecialistPool. type CreateSpecialistPoolOperation struct { lro *longrunning.Operation @@ -2942,6 +3006,59 @@ func (op *DeletePipelineJobOperation) Name() string { return op.lro.Name() } +// DeleteReasoningEngineOperation manages a long-running operation from DeleteReasoningEngine. +type DeleteReasoningEngineOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteReasoningEngineOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteReasoningEngineOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteReasoningEngineOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteReasoningEngineOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteReasoningEngineOperation) Name() string { + return op.lro.Name() +} + // DeleteSavedQueryOperation manages a long-running operation from DeleteSavedQuery. type DeleteSavedQueryOperation struct { lro *longrunning.Operation @@ -6991,6 +7108,53 @@ func (it *PublisherModelIterator) takeBuf() interface{} { return b } +// ReasoningEngineIterator manages a stream of *aiplatformpb.ReasoningEngine. +type ReasoningEngineIterator struct { + items []*aiplatformpb.ReasoningEngine + 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.ReasoningEngine, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ReasoningEngineIterator) 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 *ReasoningEngineIterator) Next() (*aiplatformpb.ReasoningEngine, error) { + var item *aiplatformpb.ReasoningEngine + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ReasoningEngineIterator) bufLen() int { + return len(it.items) +} + +func (it *ReasoningEngineIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + // SavedQueryIterator manages a stream of *aiplatformpb.SavedQuery. type SavedQueryIterator struct { items []*aiplatformpb.SavedQuery diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index 7ec4c5db0f4..12a9a508e8e 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -4465,6 +4465,284 @@ } } }, + "ReasoningEngineExecutionService": { + "clients": { + "grpc": { + "libraryClient": "ReasoningEngineExecutionClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "QueryReasoningEngine": { + "methods": [ + "QueryReasoningEngine" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "ReasoningEngineExecutionClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "QueryReasoningEngine": { + "methods": [ + "QueryReasoningEngine" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, + "ReasoningEngineService": { + "clients": { + "grpc": { + "libraryClient": "ReasoningEngineClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateReasoningEngine": { + "methods": [ + "CreateReasoningEngine" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeleteReasoningEngine": { + "methods": [ + "DeleteReasoningEngine" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetReasoningEngine": { + "methods": [ + "GetReasoningEngine" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListReasoningEngines": { + "methods": [ + "ListReasoningEngines" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "ReasoningEngineClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateReasoningEngine": { + "methods": [ + "CreateReasoningEngine" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DeleteReasoningEngine": { + "methods": [ + "DeleteReasoningEngine" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetReasoningEngine": { + "methods": [ + "GetReasoningEngine" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ListReasoningEngines": { + "methods": [ + "ListReasoningEngines" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, "ScheduleService": { "clients": { "grpc": { diff --git a/aiplatform/apiv1beta1/reasoning_engine_client.go b/aiplatform/apiv1beta1/reasoning_engine_client.go new file mode 100755 index 00000000000..fdc0ad9919f --- /dev/null +++ b/aiplatform/apiv1beta1/reasoning_engine_client.go @@ -0,0 +1,1719 @@ +// 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 ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb" + iampb "cloud.google.com/go/iam/apiv1/iampb" + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newReasoningEngineClientHook clientHook + +// ReasoningEngineCallOptions contains the retry settings for each method of ReasoningEngineClient. +type ReasoningEngineCallOptions struct { + CreateReasoningEngine []gax.CallOption + GetReasoningEngine []gax.CallOption + ListReasoningEngines []gax.CallOption + DeleteReasoningEngine []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 defaultReasoningEngineGRPCClientOptions() []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 defaultReasoningEngineCallOptions() *ReasoningEngineCallOptions { + return &ReasoningEngineCallOptions{ + CreateReasoningEngine: []gax.CallOption{}, + GetReasoningEngine: []gax.CallOption{}, + ListReasoningEngines: []gax.CallOption{}, + DeleteReasoningEngine: []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 defaultReasoningEngineRESTCallOptions() *ReasoningEngineCallOptions { + return &ReasoningEngineCallOptions{ + CreateReasoningEngine: []gax.CallOption{}, + GetReasoningEngine: []gax.CallOption{}, + ListReasoningEngines: []gax.CallOption{}, + DeleteReasoningEngine: []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{}, + } +} + +// internalReasoningEngineClient is an interface that defines the methods available from Vertex AI API. +type internalReasoningEngineClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateReasoningEngine(context.Context, *aiplatformpb.CreateReasoningEngineRequest, ...gax.CallOption) (*CreateReasoningEngineOperation, error) + CreateReasoningEngineOperation(name string) *CreateReasoningEngineOperation + GetReasoningEngine(context.Context, *aiplatformpb.GetReasoningEngineRequest, ...gax.CallOption) (*aiplatformpb.ReasoningEngine, error) + ListReasoningEngines(context.Context, *aiplatformpb.ListReasoningEnginesRequest, ...gax.CallOption) *ReasoningEngineIterator + DeleteReasoningEngine(context.Context, *aiplatformpb.DeleteReasoningEngineRequest, ...gax.CallOption) (*DeleteReasoningEngineOperation, error) + DeleteReasoningEngineOperation(name string) *DeleteReasoningEngineOperation + 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) +} + +// ReasoningEngineClient 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 managing Vertex AI’s Reasoning Engines. +type ReasoningEngineClient struct { + // The internal transport-dependent client. + internalClient internalReasoningEngineClient + + // The call options for this service. + CallOptions *ReasoningEngineCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateReasoningEngine creates a reasoning engine. +func (c *ReasoningEngineClient) CreateReasoningEngine(ctx context.Context, req *aiplatformpb.CreateReasoningEngineRequest, opts ...gax.CallOption) (*CreateReasoningEngineOperation, error) { + return c.internalClient.CreateReasoningEngine(ctx, req, opts...) +} + +// CreateReasoningEngineOperation returns a new CreateReasoningEngineOperation from a given name. +// The name must be that of a previously created CreateReasoningEngineOperation, possibly from a different process. +func (c *ReasoningEngineClient) CreateReasoningEngineOperation(name string) *CreateReasoningEngineOperation { + return c.internalClient.CreateReasoningEngineOperation(name) +} + +// GetReasoningEngine gets a reasoning engine. +func (c *ReasoningEngineClient) GetReasoningEngine(ctx context.Context, req *aiplatformpb.GetReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.ReasoningEngine, error) { + return c.internalClient.GetReasoningEngine(ctx, req, opts...) +} + +// ListReasoningEngines lists reasoning engines in a location. +func (c *ReasoningEngineClient) ListReasoningEngines(ctx context.Context, req *aiplatformpb.ListReasoningEnginesRequest, opts ...gax.CallOption) *ReasoningEngineIterator { + return c.internalClient.ListReasoningEngines(ctx, req, opts...) +} + +// DeleteReasoningEngine deletes a reasoning engine. +func (c *ReasoningEngineClient) DeleteReasoningEngine(ctx context.Context, req *aiplatformpb.DeleteReasoningEngineRequest, opts ...gax.CallOption) (*DeleteReasoningEngineOperation, error) { + return c.internalClient.DeleteReasoningEngine(ctx, req, opts...) +} + +// DeleteReasoningEngineOperation returns a new DeleteReasoningEngineOperation from a given name. +// The name must be that of a previously created DeleteReasoningEngineOperation, possibly from a different process. +func (c *ReasoningEngineClient) DeleteReasoningEngineOperation(name string) *DeleteReasoningEngineOperation { + return c.internalClient.DeleteReasoningEngineOperation(name) +} + +// GetLocation gets information about a location. +func (c *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) 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 *ReasoningEngineClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.WaitOperation(ctx, req, opts...) +} + +// reasoningEngineGRPCClient 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 reasoningEngineGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing ReasoningEngineClient + CallOptions **ReasoningEngineCallOptions + + // The gRPC API client. + reasoningEngineClient aiplatformpb.ReasoningEngineServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewReasoningEngineClient creates a new reasoning engine 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 managing Vertex AI’s Reasoning Engines. +func NewReasoningEngineClient(ctx context.Context, opts ...option.ClientOption) (*ReasoningEngineClient, error) { + clientOpts := defaultReasoningEngineGRPCClientOptions() + if newReasoningEngineClientHook != nil { + hookOpts, err := newReasoningEngineClientHook(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 := ReasoningEngineClient{CallOptions: defaultReasoningEngineCallOptions()} + + c := &reasoningEngineGRPCClient{ + connPool: connPool, + reasoningEngineClient: aiplatformpb.NewReasoningEngineServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type reasoningEngineRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing ReasoningEngineClient + CallOptions **ReasoningEngineCallOptions +} + +// NewReasoningEngineRESTClient creates a new reasoning engine service rest client. +// +// A service for managing Vertex AI’s Reasoning Engines. +func NewReasoningEngineRESTClient(ctx context.Context, opts ...option.ClientOption) (*ReasoningEngineClient, error) { + clientOpts := append(defaultReasoningEngineRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultReasoningEngineRESTCallOptions() + c := &reasoningEngineRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &ReasoningEngineClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultReasoningEngineRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://aiplatform.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// 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 *reasoningEngineRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + 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 *reasoningEngineRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *reasoningEngineRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *reasoningEngineGRPCClient) CreateReasoningEngine(ctx context.Context, req *aiplatformpb.CreateReasoningEngineRequest, opts ...gax.CallOption) (*CreateReasoningEngineOperation, 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).CreateReasoningEngine[0:len((*c.CallOptions).CreateReasoningEngine):len((*c.CallOptions).CreateReasoningEngine)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.reasoningEngineClient.CreateReasoningEngine(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *reasoningEngineGRPCClient) GetReasoningEngine(ctx context.Context, req *aiplatformpb.GetReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.ReasoningEngine, 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).GetReasoningEngine[0:len((*c.CallOptions).GetReasoningEngine):len((*c.CallOptions).GetReasoningEngine)], opts...) + var resp *aiplatformpb.ReasoningEngine + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.reasoningEngineClient.GetReasoningEngine(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *reasoningEngineGRPCClient) ListReasoningEngines(ctx context.Context, req *aiplatformpb.ListReasoningEnginesRequest, opts ...gax.CallOption) *ReasoningEngineIterator { + 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).ListReasoningEngines[0:len((*c.CallOptions).ListReasoningEngines):len((*c.CallOptions).ListReasoningEngines)], opts...) + it := &ReasoningEngineIterator{} + req = proto.Clone(req).(*aiplatformpb.ListReasoningEnginesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ReasoningEngine, string, error) { + resp := &aiplatformpb.ListReasoningEnginesResponse{} + 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.reasoningEngineClient.ListReasoningEngines(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetReasoningEngines(), 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 *reasoningEngineGRPCClient) DeleteReasoningEngine(ctx context.Context, req *aiplatformpb.DeleteReasoningEngineRequest, opts ...gax.CallOption) (*DeleteReasoningEngineOperation, 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).DeleteReasoningEngine[0:len((*c.CallOptions).DeleteReasoningEngine):len((*c.CallOptions).DeleteReasoningEngine)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.reasoningEngineClient.DeleteReasoningEngine(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 *reasoningEngineGRPCClient) 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 +} + +// CreateReasoningEngine creates a reasoning engine. +func (c *reasoningEngineRESTClient) CreateReasoningEngine(ctx context.Context, req *aiplatformpb.CreateReasoningEngineRequest, opts ...gax.CallOption) (*CreateReasoningEngineOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetReasoningEngine() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/reasoningEngines", req.GetParent()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &CreateReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetReasoningEngine gets a reasoning engine. +func (c *reasoningEngineRESTClient) GetReasoningEngine(ctx context.Context, req *aiplatformpb.GetReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.ReasoningEngine, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetReasoningEngine[0:len((*c.CallOptions).GetReasoningEngine):len((*c.CallOptions).GetReasoningEngine)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.ReasoningEngine{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListReasoningEngines lists reasoning engines in a location. +func (c *reasoningEngineRESTClient) ListReasoningEngines(ctx context.Context, req *aiplatformpb.ListReasoningEnginesRequest, opts ...gax.CallOption) *ReasoningEngineIterator { + it := &ReasoningEngineIterator{} + req = proto.Clone(req).(*aiplatformpb.ListReasoningEnginesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.ReasoningEngine, string, error) { + resp := &aiplatformpb.ListReasoningEnginesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v/reasoningEngines", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetReasoningEngines(), 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 +} + +// DeleteReasoningEngine deletes a reasoning engine. +func (c *reasoningEngineRESTClient) DeleteReasoningEngine(ctx context.Context, req *aiplatformpb.DeleteReasoningEngineRequest, opts ...gax.CallOption) (*DeleteReasoningEngineOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/ui/%s", resp.GetName()) + return &DeleteReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *reasoningEngineRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *reasoningEngineRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + 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) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + 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 +} + +// 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 *reasoningEngineRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// 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 *reasoningEngineRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// 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 *reasoningEngineRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *reasoningEngineRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + 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) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + 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 +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout[1:len(timeout)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateReasoningEngineOperation returns a new CreateReasoningEngineOperation from a given name. +// The name must be that of a previously created CreateReasoningEngineOperation, possibly from a different process. +func (c *reasoningEngineGRPCClient) CreateReasoningEngineOperation(name string) *CreateReasoningEngineOperation { + return &CreateReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateReasoningEngineOperation returns a new CreateReasoningEngineOperation from a given name. +// The name must be that of a previously created CreateReasoningEngineOperation, possibly from a different process. +func (c *reasoningEngineRESTClient) CreateReasoningEngineOperation(name string) *CreateReasoningEngineOperation { + override := fmt.Sprintf("/ui/%s", name) + return &CreateReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// DeleteReasoningEngineOperation returns a new DeleteReasoningEngineOperation from a given name. +// The name must be that of a previously created DeleteReasoningEngineOperation, possibly from a different process. +func (c *reasoningEngineGRPCClient) DeleteReasoningEngineOperation(name string) *DeleteReasoningEngineOperation { + return &DeleteReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteReasoningEngineOperation returns a new DeleteReasoningEngineOperation from a given name. +// The name must be that of a previously created DeleteReasoningEngineOperation, possibly from a different process. +func (c *reasoningEngineRESTClient) DeleteReasoningEngineOperation(name string) *DeleteReasoningEngineOperation { + override := fmt.Sprintf("/ui/%s", name) + return &DeleteReasoningEngineOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} diff --git a/aiplatform/apiv1beta1/reasoning_engine_client_example_test.go b/aiplatform/apiv1beta1/reasoning_engine_client_example_test.go new file mode 100644 index 00000000000..90c74c1f6a3 --- /dev/null +++ b/aiplatform/apiv1beta1/reasoning_engine_client_example_test.go @@ -0,0 +1,434 @@ +// 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/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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 ExampleNewReasoningEngineClient() { + 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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewReasoningEngineRESTClient() { + 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.NewReasoningEngineRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleReasoningEngineClient_CreateReasoningEngine() { + 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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#CreateReasoningEngineRequest. + } + op, err := c.CreateReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleReasoningEngineClient_DeleteReasoningEngine() { + 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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DeleteReasoningEngineRequest. + } + op, err := c.DeleteReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleReasoningEngineClient_GetReasoningEngine() { + 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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetReasoningEngineRequest. + } + resp, err := c.GetReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleReasoningEngineClient_ListReasoningEngines() { + 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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListReasoningEnginesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#ListReasoningEnginesRequest. + } + it := c.ListReasoningEngines(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 + } +} + +func ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 ExampleReasoningEngineClient_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.NewReasoningEngineClient(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 + } +} + +func ExampleReasoningEngineClient_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.NewReasoningEngineClient(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/aiplatform/apiv1beta1/reasoning_engine_execution_client.go b/aiplatform/apiv1beta1/reasoning_engine_execution_client.go new file mode 100755 index 00000000000..f70beab3f78 --- /dev/null +++ b/aiplatform/apiv1beta1/reasoning_engine_execution_client.go @@ -0,0 +1,1308 @@ +// 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 ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newReasoningEngineExecutionClientHook clientHook + +// ReasoningEngineExecutionCallOptions contains the retry settings for each method of ReasoningEngineExecutionClient. +type ReasoningEngineExecutionCallOptions struct { + QueryReasoningEngine []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 defaultReasoningEngineExecutionGRPCClientOptions() []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 defaultReasoningEngineExecutionCallOptions() *ReasoningEngineExecutionCallOptions { + return &ReasoningEngineExecutionCallOptions{ + QueryReasoningEngine: []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 defaultReasoningEngineExecutionRESTCallOptions() *ReasoningEngineExecutionCallOptions { + return &ReasoningEngineExecutionCallOptions{ + QueryReasoningEngine: []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{}, + } +} + +// internalReasoningEngineExecutionClient is an interface that defines the methods available from Vertex AI API. +type internalReasoningEngineExecutionClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + QueryReasoningEngine(context.Context, *aiplatformpb.QueryReasoningEngineRequest, ...gax.CallOption) (*aiplatformpb.QueryReasoningEngineResponse, 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) +} + +// ReasoningEngineExecutionClient 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 executing queries on Reasoning Engine. +type ReasoningEngineExecutionClient struct { + // The internal transport-dependent client. + internalClient internalReasoningEngineExecutionClient + + // The call options for this service. + CallOptions *ReasoningEngineExecutionCallOptions +} + +// 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// QueryReasoningEngine queries using a reasoning engine. +func (c *ReasoningEngineExecutionClient) QueryReasoningEngine(ctx context.Context, req *aiplatformpb.QueryReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.QueryReasoningEngineResponse, error) { + return c.internalClient.QueryReasoningEngine(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) 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 *ReasoningEngineExecutionClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.WaitOperation(ctx, req, opts...) +} + +// reasoningEngineExecutionGRPCClient 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 reasoningEngineExecutionGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing ReasoningEngineExecutionClient + CallOptions **ReasoningEngineExecutionCallOptions + + // The gRPC API client. + reasoningEngineExecutionClient aiplatformpb.ReasoningEngineExecutionServiceClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewReasoningEngineExecutionClient creates a new reasoning engine execution 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 executing queries on Reasoning Engine. +func NewReasoningEngineExecutionClient(ctx context.Context, opts ...option.ClientOption) (*ReasoningEngineExecutionClient, error) { + clientOpts := defaultReasoningEngineExecutionGRPCClientOptions() + if newReasoningEngineExecutionClientHook != nil { + hookOpts, err := newReasoningEngineExecutionClientHook(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 := ReasoningEngineExecutionClient{CallOptions: defaultReasoningEngineExecutionCallOptions()} + + c := &reasoningEngineExecutionGRPCClient{ + connPool: connPool, + reasoningEngineExecutionClient: aiplatformpb.NewReasoningEngineExecutionServiceClient(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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type reasoningEngineExecutionRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing ReasoningEngineExecutionClient + CallOptions **ReasoningEngineExecutionCallOptions +} + +// NewReasoningEngineExecutionRESTClient creates a new reasoning engine execution service rest client. +// +// A service for executing queries on Reasoning Engine. +func NewReasoningEngineExecutionRESTClient(ctx context.Context, opts ...option.ClientOption) (*ReasoningEngineExecutionClient, error) { + clientOpts := append(defaultReasoningEngineExecutionRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultReasoningEngineExecutionRESTCallOptions() + c := &reasoningEngineExecutionRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &ReasoningEngineExecutionClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultReasoningEngineExecutionRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://aiplatform.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// 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 *reasoningEngineExecutionRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + 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 *reasoningEngineExecutionRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *reasoningEngineExecutionRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *reasoningEngineExecutionGRPCClient) QueryReasoningEngine(ctx context.Context, req *aiplatformpb.QueryReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.QueryReasoningEngineResponse, 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).QueryReasoningEngine[0:len((*c.CallOptions).QueryReasoningEngine):len((*c.CallOptions).QueryReasoningEngine)], opts...) + var resp *aiplatformpb.QueryReasoningEngineResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.reasoningEngineExecutionClient.QueryReasoningEngine(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 *reasoningEngineExecutionGRPCClient) 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 +} + +// QueryReasoningEngine queries using a reasoning engine. +func (c *reasoningEngineExecutionRESTClient) QueryReasoningEngine(ctx context.Context, req *aiplatformpb.QueryReasoningEngineRequest, opts ...gax.CallOption) (*aiplatformpb.QueryReasoningEngineResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:query", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).QueryReasoningEngine[0:len((*c.CallOptions).QueryReasoningEngine):len((*c.CallOptions).QueryReasoningEngine)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.QueryReasoningEngineResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *reasoningEngineExecutionRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *reasoningEngineExecutionRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + 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) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/locations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + 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 +} + +// 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 *reasoningEngineExecutionRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:getIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// 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 *reasoningEngineExecutionRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:setIamPolicy", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// 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 *reasoningEngineExecutionRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v:testIamPermissions", req.GetResource()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineExecutionRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:cancel", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineExecutionRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineExecutionRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v", req.GetName()) + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *reasoningEngineExecutionRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + 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) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/ui/%v/operations", req.GetName()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + 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 +} + +// WaitOperation is a utility method from google.longrunning.Operations. +func (c *reasoningEngineExecutionRESTClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/ui/%v:wait", req.GetName()) + + params := url.Values{} + if req.GetTimeout() != nil { + timeout, err := protojson.Marshal(req.GetTimeout()) + if err != nil { + return nil, err + } + params.Add("timeout", string(timeout[1:len(timeout)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).WaitOperation[0:len((*c.CallOptions).WaitOperation):len((*c.CallOptions).WaitOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} diff --git a/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_test.go b/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_test.go new file mode 100644 index 00000000000..d1f3267b151 --- /dev/null +++ b/aiplatform/apiv1beta1/reasoning_engine_execution_client_example_test.go @@ -0,0 +1,345 @@ +// 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/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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 ExampleNewReasoningEngineExecutionClient() { + 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.NewReasoningEngineExecutionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewReasoningEngineExecutionRESTClient() { + 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.NewReasoningEngineExecutionRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleReasoningEngineExecutionClient_QueryReasoningEngine() { + 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.NewReasoningEngineExecutionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.QueryReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#QueryReasoningEngineRequest. + } + resp, err := c.QueryReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 + } +} + +func ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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 + } +} + +func ExampleReasoningEngineExecutionClient_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.NewReasoningEngineExecutionClient(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/apiv1beta1/ReasoningEngineClient/CancelOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/CancelOperation/main.go new file mode 100644 index 00000000000..7c672dcbe87 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_CancelOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_CancelOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/CreateReasoningEngine/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/CreateReasoningEngine/main.go new file mode 100644 index 00000000000..bffbf2d1381 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/CreateReasoningEngine/main.go @@ -0,0 +1,58 @@ +// 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_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#CreateReasoningEngineRequest. + } + op, err := c.CreateReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/DeleteOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/DeleteOperation/main.go new file mode 100644 index 00000000000..37724ae6002 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_DeleteOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_DeleteOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/DeleteReasoningEngine/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/DeleteReasoningEngine/main.go new file mode 100644 index 00000000000..632a4187403 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/DeleteReasoningEngine/main.go @@ -0,0 +1,56 @@ +// 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_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#DeleteReasoningEngineRequest. + } + op, err := c.DeleteReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetIamPolicy/main.go new file mode 100644 index 00000000000..e456b54ae3e --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_GetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetLocation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetLocation/main.go new file mode 100644 index 00000000000..cbb0886b656 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_GetLocation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_GetLocation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetOperation/main.go new file mode 100644 index 00000000000..f9a56e019cb --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_GetOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_GetOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetReasoningEngine/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetReasoningEngine/main.go new file mode 100644 index 00000000000..30b9b46dd91 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/GetReasoningEngine/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_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetReasoningEngineRequest. + } + resp, err := c.GetReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListLocations/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListLocations/main.go new file mode 100644 index 00000000000..6a419a78536 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListLocations/main.go @@ -0,0 +1,60 @@ +// 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_v1beta1_generated_ReasoningEngineService_ListLocations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + "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.NewReasoningEngineClient(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 + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_ListLocations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListOperations/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListOperations/main.go new file mode 100644 index 00000000000..70cce395752 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListOperations/main.go @@ -0,0 +1,60 @@ +// 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_v1beta1_generated_ReasoningEngineService_ListOperations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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 + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_ListOperations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListReasoningEngines/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListReasoningEngines/main.go new file mode 100644 index 00000000000..f9dc3e8700c --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/ListReasoningEngines/main.go @@ -0,0 +1,60 @@ +// 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_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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.NewReasoningEngineClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListReasoningEnginesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#ListReasoningEnginesRequest. + } + it := c.ListReasoningEngines(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/SetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/SetIamPolicy/main.go new file mode 100644 index 00000000000..a17409b9493 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_SetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/TestIamPermissions/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/TestIamPermissions/main.go new file mode 100644 index 00000000000..ea1fccc064d --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_TestIamPermissions_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/WaitOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/WaitOperation/main.go new file mode 100644 index 00000000000..6e04a117a11 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineClient/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_v1beta1_generated_ReasoningEngineService_WaitOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineClient(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_v1beta1_generated_ReasoningEngineService_WaitOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/CancelOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/CancelOperation/main.go new file mode 100644 index 00000000000..82304a22cde --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_CancelOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_CancelOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/DeleteOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/DeleteOperation/main.go new file mode 100644 index 00000000000..bbef72bdf98 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_DeleteOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_DeleteOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetIamPolicy/main.go new file mode 100644 index 00000000000..638c74f8664 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_GetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetLocation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetLocation/main.go new file mode 100644 index 00000000000..0b2ca3f1447 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_GetLocation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_GetLocation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/GetOperation/main.go new file mode 100644 index 00000000000..38a846069bb --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_GetOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_GetOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListLocations/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListLocations/main.go new file mode 100644 index 00000000000..23f38cfc22d --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListLocations/main.go @@ -0,0 +1,60 @@ +// 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_v1beta1_generated_ReasoningEngineExecutionService_ListLocations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + "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.NewReasoningEngineExecutionClient(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 + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_ListLocations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListOperations/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListOperations/main.go new file mode 100644 index 00000000000..863b0945af3 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/ListOperations/main.go @@ -0,0 +1,60 @@ +// 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_v1beta1_generated_ReasoningEngineExecutionService_ListOperations_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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 + } +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_ListOperations_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/QueryReasoningEngine/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/QueryReasoningEngine/main.go new file mode 100644 index 00000000000..acdaa5e6f13 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/QueryReasoningEngine/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_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + aiplatformpb "cloud.google.com/go/aiplatform/apiv1beta1/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.NewReasoningEngineExecutionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.QueryReasoningEngineRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#QueryReasoningEngineRequest. + } + resp, err := c.QueryReasoningEngine(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/SetIamPolicy/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/SetIamPolicy/main.go new file mode 100644 index 00000000000..9b8ba4b9298 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_SetIamPolicy_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/TestIamPermissions/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/TestIamPermissions/main.go new file mode 100644 index 00000000000..260b8be78f8 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_TestIamPermissions_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/WaitOperation/main.go b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/WaitOperation/main.go new file mode 100644 index 00000000000..92f9611c205 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1beta1/ReasoningEngineExecutionClient/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_v1beta1_generated_ReasoningEngineExecutionService_WaitOperation_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1beta1" + 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.NewReasoningEngineExecutionClient(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_v1beta1_generated_ReasoningEngineExecutionService_WaitOperation_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index 6404d759218..86f25859b82 100644 --- a/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/internal/generated/snippets/aiplatform/apiv1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -19032,6 +19032,1152 @@ } ] }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_CancelOperation_sync", + "title": "aiplatform CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineExecutionClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_DeleteOperation_sync", + "title": "aiplatform DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineExecutionClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_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": "ReasoningEngineExecutionClient/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_GetLocation_sync", + "title": "aiplatform GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "ReasoningEngineExecutionClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_GetOperation_sync", + "title": "aiplatform GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineExecutionClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_ListLocations_sync", + "title": "aiplatform ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "ReasoningEngineExecutionClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_ListOperations_sync", + "title": "aiplatform ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineExecutionClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_sync", + "title": "aiplatform QueryReasoningEngine Sample", + "description": "QueryReasoningEngine queries using a reasoning engine.", + "file": "ReasoningEngineExecutionClient/QueryReasoningEngine/main.go", + "language": "GO", + "clientMethod": { + "shortName": "QueryReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.QueryReasoningEngine", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.QueryReasoningEngineRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.QueryReasoningEngineResponse", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "method": { + "shortName": "QueryReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine", + "service": { + "shortName": "ReasoningEngineExecutionService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_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": "ReasoningEngineExecutionClient/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_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": "ReasoningEngineExecutionClient/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.TestIamPermissionsResponse", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineExecutionService_WaitOperation_sync", + "title": "aiplatform WaitOperation Sample", + "description": "WaitOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineExecutionClient/WaitOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "WaitOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient.WaitOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.WaitOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "ReasoningEngineExecutionClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionClient" + }, + "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_v1beta1_generated_ReasoningEngineService_CancelOperation_sync", + "title": "aiplatform CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_sync", + "title": "aiplatform CreateReasoningEngine Sample", + "description": "CreateReasoningEngine creates a reasoning engine.", + "file": "ReasoningEngineClient/CreateReasoningEngine/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.CreateReasoningEngine", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.CreateReasoningEngineRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateReasoningEngineOperation", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "CreateReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_DeleteOperation_sync", + "title": "aiplatform DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_sync", + "title": "aiplatform DeleteReasoningEngine Sample", + "description": "DeleteReasoningEngine deletes a reasoning engine.", + "file": "ReasoningEngineClient/DeleteReasoningEngine/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.DeleteReasoningEngine", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.DeleteReasoningEngineRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteReasoningEngineOperation", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "DeleteReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 56, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_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": "ReasoningEngineClient/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_GetLocation_sync", + "title": "aiplatform GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "ReasoningEngineClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_GetOperation_sync", + "title": "aiplatform GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_sync", + "title": "aiplatform GetReasoningEngine Sample", + "description": "GetReasoningEngine gets a reasoning engine.", + "file": "ReasoningEngineClient/GetReasoningEngine/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.GetReasoningEngine", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.GetReasoningEngineRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*aiplatformpb.ReasoningEngine", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "GetReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_ListLocations_sync", + "title": "aiplatform ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "ReasoningEngineClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_ListOperations_sync", + "title": "aiplatform ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_sync", + "title": "aiplatform ListReasoningEngines Sample", + "description": "ListReasoningEngines lists reasoning engines in a location.", + "file": "ReasoningEngineClient/ListReasoningEngines/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListReasoningEngines", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.ListReasoningEngines", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "aiplatformpb.ListReasoningEnginesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ReasoningEngineIterator", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "method": { + "shortName": "ListReasoningEngines", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_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": "ReasoningEngineClient/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_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": "ReasoningEngineClient/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.TestIamPermissionsResponse", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ReasoningEngineService_WaitOperation_sync", + "title": "aiplatform WaitOperation Sample", + "description": "WaitOperation is a utility method from google.longrunning.Operations.", + "file": "ReasoningEngineClient/WaitOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "WaitOperation", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient.WaitOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.WaitOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "ReasoningEngineClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineClient" + }, + "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_v1beta1_generated_ScheduleService_CancelOperation_sync", "title": "aiplatform CancelOperation Sample", diff --git a/netapp/apiv1/netapppb/storage_pool.pb.go b/netapp/apiv1/netapppb/storage_pool.pb.go index baee15b9c84..a579150231f 100755 --- a/netapp/apiv1/netapppb/storage_pool.pb.go +++ b/netapp/apiv1/netapppb/storage_pool.pb.go @@ -532,8 +532,8 @@ type StoragePool struct { KmsConfig string `protobuf:"bytes,13,opt,name=kms_config,json=kmsConfig,proto3" json:"kms_config,omitempty"` // Optional. Flag indicating if the pool is NFS LDAP enabled or not. LdapEnabled bool `protobuf:"varint,14,opt,name=ldap_enabled,json=ldapEnabled,proto3" json:"ldap_enabled,omitempty"` - // Optional. This field is currently not implemented. Currently values - // provided in this field will be ignored. + // Optional. This field is not implemented. The values provided in this field + // are ignored. PsaRange string `protobuf:"bytes,15,opt,name=psa_range,json=psaRange,proto3" json:"psa_range,omitempty"` // Output only. Specifies the current pool encryption key source. EncryptionType EncryptionType `protobuf:"varint,16,opt,name=encryption_type,json=encryptionType,proto3,enum=google.cloud.netapp.v1.EncryptionType" json:"encryption_type,omitempty"` diff --git a/netapp/apiv1/netapppb/volume.pb.go b/netapp/apiv1/netapppb/volume.pb.go index b0c1a62cad4..4eee96820d6 100755 --- a/netapp/apiv1/netapppb/volume.pb.go +++ b/netapp/apiv1/netapppb/volume.pb.go @@ -242,7 +242,7 @@ const ( SecurityStyle_SECURITY_STYLE_UNSPECIFIED SecurityStyle = 0 // SecurityStyle uses NTFS SecurityStyle_NTFS SecurityStyle = 1 - // SecurityStyle uses NTFS + // SecurityStyle uses UNIX SecurityStyle_UNIX SecurityStyle = 2 ) @@ -879,8 +879,8 @@ type Volume struct { CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // Required. Share name of the volume ShareName string `protobuf:"bytes,5,opt,name=share_name,json=shareName,proto3" json:"share_name,omitempty"` - // Output only. This field is currently not implemented. Currently values - // provided in this field will be ignored. + // Output only. This field is not implemented. The values provided in this + // field are ignored. PsaRange string `protobuf:"bytes,6,opt,name=psa_range,json=psaRange,proto3" json:"psa_range,omitempty"` // Required. StoragePool name of the volume StoragePool string `protobuf:"bytes,7,opt,name=storage_pool,json=storagePool,proto3" json:"storage_pool,omitempty"`