diff --git a/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go b/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go new file mode 100755 index 000000000000..588085faf19d --- /dev/null +++ b/aiplatform/apiv1beta1/aiplatformpb/model_garden_service.pb.go @@ -0,0 +1,402 @@ +// 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.30.0 +// protoc v3.21.12 +// source: google/cloud/aiplatform/v1beta1/model_garden_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" +) + +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) +) + +// View enumeration of PublisherModel. +type PublisherModelView int32 + +const ( + // The default / unset value. The API will default to the BASIC view. + PublisherModelView_PUBLISHER_MODEL_VIEW_UNSPECIFIED PublisherModelView = 0 + // Include basic metadata about the publisher model, but not the full + // contents. + PublisherModelView_PUBLISHER_MODEL_VIEW_BASIC PublisherModelView = 1 + // Include everything. + PublisherModelView_PUBLISHER_MODEL_VIEW_FULL PublisherModelView = 2 + // Include: VersionId, ModelVersionExternalName, and SupportedActions. + PublisherModelView_PUBLISHER_MODEL_VERSION_VIEW_BASIC PublisherModelView = 3 +) + +// Enum value maps for PublisherModelView. +var ( + PublisherModelView_name = map[int32]string{ + 0: "PUBLISHER_MODEL_VIEW_UNSPECIFIED", + 1: "PUBLISHER_MODEL_VIEW_BASIC", + 2: "PUBLISHER_MODEL_VIEW_FULL", + 3: "PUBLISHER_MODEL_VERSION_VIEW_BASIC", + } + PublisherModelView_value = map[string]int32{ + "PUBLISHER_MODEL_VIEW_UNSPECIFIED": 0, + "PUBLISHER_MODEL_VIEW_BASIC": 1, + "PUBLISHER_MODEL_VIEW_FULL": 2, + "PUBLISHER_MODEL_VERSION_VIEW_BASIC": 3, + } +) + +func (x PublisherModelView) Enum() *PublisherModelView { + p := new(PublisherModelView) + *p = x + return p +} + +func (x PublisherModelView) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PublisherModelView) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_enumTypes[0].Descriptor() +} + +func (PublisherModelView) Type() protoreflect.EnumType { + return &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_enumTypes[0] +} + +func (x PublisherModelView) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PublisherModelView.Descriptor instead. +func (PublisherModelView) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescGZIP(), []int{0} +} + +// Request message for +// [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel] +type GetPublisherModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the PublisherModel resource. + // Format: + // `publishers/{publisher}/models/{publisher_model}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. The IETF BCP-47 language code representing the language in which + // the publisher model's text information should be written in (see go/bcp47). + LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` + // Optional. PublisherModel view specifying which fields to read. + View PublisherModelView `protobuf:"varint,3,opt,name=view,proto3,enum=google.cloud.aiplatform.v1beta1.PublisherModelView" json:"view,omitempty"` +} + +func (x *GetPublisherModelRequest) Reset() { + *x = GetPublisherModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPublisherModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherModelRequest) ProtoMessage() {} + +func (x *GetPublisherModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_model_garden_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 GetPublisherModelRequest.ProtoReflect.Descriptor instead. +func (*GetPublisherModelRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetPublisherModelRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetPublisherModelRequest) GetLanguageCode() string { + if x != nil { + return x.LanguageCode + } + return "" +} + +func (x *GetPublisherModelRequest) GetView() PublisherModelView { + if x != nil { + return x.View + } + return PublisherModelView_PUBLISHER_MODEL_VIEW_UNSPECIFIED +} + +var File_google_cloud_aiplatform_v1beta1_model_garden_service_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDesc = []byte{ + 0x0a, 0x3a, 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, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x67, 0x61, 0x72, 0x64, 0x65, 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, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd8, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x4c, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x33, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x76, 0x69, + 0x65, 0x77, 0x2a, 0xa1, 0x01, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x55, 0x42, + 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x4c, 0x5f, 0x56, 0x49, 0x45, + 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1e, 0x0a, 0x1a, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, + 0x45, 0x4c, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, + 0x1d, 0x0a, 0x19, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, + 0x45, 0x4c, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x02, 0x12, 0x26, + 0x0a, 0x22, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, + 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x42, + 0x41, 0x53, 0x49, 0x43, 0x10, 0x03, 0x32, 0x9b, 0x02, 0x0a, 0x12, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x47, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb5, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x12, 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, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, + 0x34, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 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, 0xee, 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, 0x17, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x47, 0x61, 0x72, 0x64, 0x65, 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_model_garden_service_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescData = file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_goTypes = []interface{}{ + (PublisherModelView)(0), // 0: google.cloud.aiplatform.v1beta1.PublisherModelView + (*GetPublisherModelRequest)(nil), // 1: google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + (*PublisherModel)(nil), // 2: google.cloud.aiplatform.v1beta1.PublisherModel +} +var file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_depIdxs = []int32{ + 0, // 0: google.cloud.aiplatform.v1beta1.GetPublisherModelRequest.view:type_name -> google.cloud.aiplatform.v1beta1.PublisherModelView + 1, // 1: google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel:input_type -> google.cloud.aiplatform.v1beta1.GetPublisherModelRequest + 2, // 2: google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel:output_type -> google.cloud.aiplatform.v1beta1.PublisherModel + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_init() } +func file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_init() { + if File_google_cloud_aiplatform_v1beta1_model_garden_service_proto != nil { + return + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPublisherModelRequest); 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_model_garden_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_depIdxs, + EnumInfos: file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_enumTypes, + MessageInfos: file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1beta1_model_garden_service_proto = out.File + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_rawDesc = nil + file_google_cloud_aiplatform_v1beta1_model_garden_service_proto_goTypes = nil + file_google_cloud_aiplatform_v1beta1_model_garden_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 + +// ModelGardenServiceClient is the client API for ModelGardenService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ModelGardenServiceClient interface { + // Gets a Model Garden publisher model. + GetPublisherModel(ctx context.Context, in *GetPublisherModelRequest, opts ...grpc.CallOption) (*PublisherModel, error) +} + +type modelGardenServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewModelGardenServiceClient(cc grpc.ClientConnInterface) ModelGardenServiceClient { + return &modelGardenServiceClient{cc} +} + +func (c *modelGardenServiceClient) GetPublisherModel(ctx context.Context, in *GetPublisherModelRequest, opts ...grpc.CallOption) (*PublisherModel, error) { + out := new(PublisherModel) + err := c.cc.Invoke(ctx, "/google.cloud.aiplatform.v1beta1.ModelGardenService/GetPublisherModel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ModelGardenServiceServer is the server API for ModelGardenService service. +type ModelGardenServiceServer interface { + // Gets a Model Garden publisher model. + GetPublisherModel(context.Context, *GetPublisherModelRequest) (*PublisherModel, error) +} + +// UnimplementedModelGardenServiceServer can be embedded to have forward compatible implementations. +type UnimplementedModelGardenServiceServer struct { +} + +func (*UnimplementedModelGardenServiceServer) GetPublisherModel(context.Context, *GetPublisherModelRequest) (*PublisherModel, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPublisherModel not implemented") +} + +func RegisterModelGardenServiceServer(s *grpc.Server, srv ModelGardenServiceServer) { + s.RegisterService(&_ModelGardenService_serviceDesc, srv) +} + +func _ModelGardenService_GetPublisherModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublisherModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ModelGardenServiceServer).GetPublisherModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.aiplatform.v1beta1.ModelGardenService/GetPublisherModel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ModelGardenServiceServer).GetPublisherModel(ctx, req.(*GetPublisherModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ModelGardenService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.aiplatform.v1beta1.ModelGardenService", + HandlerType: (*ModelGardenServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPublisherModel", + Handler: _ModelGardenService_GetPublisherModel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/aiplatform/v1beta1/model_garden_service.proto", +} diff --git a/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go b/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go new file mode 100755 index 000000000000..0f47870a02b6 --- /dev/null +++ b/aiplatform/apiv1beta1/aiplatformpb/publisher_model.pb.go @@ -0,0 +1,1159 @@ +// 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.30.0 +// protoc v3.21.12 +// source: google/cloud/aiplatform/v1beta1/publisher_model.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" +) + +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) +) + +// An enum representing the open source category of a PublisherModel. +type PublisherModel_OpenSourceCategory int32 + +const ( + // The open source category is unspecified, which should not be used. + PublisherModel_OPEN_SOURCE_CATEGORY_UNSPECIFIED PublisherModel_OpenSourceCategory = 0 + // Used to indicate the PublisherModel is not open sourced. + PublisherModel_PROPRIETARY PublisherModel_OpenSourceCategory = 1 + // Used to indicate the PublisherModel is a Google-owned open source model + // w/ Google checkpoint. + PublisherModel_GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT PublisherModel_OpenSourceCategory = 2 + // Used to indicate the PublisherModel is a 3p-owned open source model w/ + // Google checkpoint. + PublisherModel_THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT PublisherModel_OpenSourceCategory = 3 + // Used to indicate the PublisherModel is a Google-owned pure open source + // model. + PublisherModel_GOOGLE_OWNED_OSS PublisherModel_OpenSourceCategory = 4 + // Used to indicate the PublisherModel is a 3p-owned pure open source model. + PublisherModel_THIRD_PARTY_OWNED_OSS PublisherModel_OpenSourceCategory = 5 +) + +// Enum value maps for PublisherModel_OpenSourceCategory. +var ( + PublisherModel_OpenSourceCategory_name = map[int32]string{ + 0: "OPEN_SOURCE_CATEGORY_UNSPECIFIED", + 1: "PROPRIETARY", + 2: "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT", + 3: "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT", + 4: "GOOGLE_OWNED_OSS", + 5: "THIRD_PARTY_OWNED_OSS", + } + PublisherModel_OpenSourceCategory_value = map[string]int32{ + "OPEN_SOURCE_CATEGORY_UNSPECIFIED": 0, + "PROPRIETARY": 1, + "GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 2, + "THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT": 3, + "GOOGLE_OWNED_OSS": 4, + "THIRD_PARTY_OWNED_OSS": 5, + } +) + +func (x PublisherModel_OpenSourceCategory) Enum() *PublisherModel_OpenSourceCategory { + p := new(PublisherModel_OpenSourceCategory) + *p = x + return p +} + +func (x PublisherModel_OpenSourceCategory) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PublisherModel_OpenSourceCategory) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_enumTypes[0].Descriptor() +} + +func (PublisherModel_OpenSourceCategory) Type() protoreflect.EnumType { + return &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_enumTypes[0] +} + +func (x PublisherModel_OpenSourceCategory) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PublisherModel_OpenSourceCategory.Descriptor instead. +func (PublisherModel_OpenSourceCategory) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 0} +} + +// A Model Garden Publisher Model. +type PublisherModel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the PublisherModel. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. Immutable. The version ID of the PublisherModel. + // A new version is committed when a new model version is uploaded under an + // existing model id. It is an auto-incrementing decimal number in string + // representation. + VersionId string `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + // Required. Indicates the open source category of the publisher model. + OpenSourceCategory PublisherModel_OpenSourceCategory `protobuf:"varint,7,opt,name=open_source_category,json=openSourceCategory,proto3,enum=google.cloud.aiplatform.v1beta1.PublisherModel_OpenSourceCategory" json:"open_source_category,omitempty"` + // Optional. Supported call-to-action options. + SupportedActions *PublisherModel_CallToAction `protobuf:"bytes,19,opt,name=supported_actions,json=supportedActions,proto3" json:"supported_actions,omitempty"` + // Optional. Additional information about the model's Frameworks. + Frameworks []string `protobuf:"bytes,23,rep,name=frameworks,proto3" json:"frameworks,omitempty"` + // Optional. Output only. Immutable. Used to indicate this model has a + // publisher model and provide the template of the publisher model resource + // name. + PublisherModelTemplate string `protobuf:"bytes,30,opt,name=publisher_model_template,json=publisherModelTemplate,proto3" json:"publisher_model_template,omitempty"` + // Optional. The schemata that describes formats of the PublisherModel's + // predictions and explanations as given and returned via + // [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict]. + PredictSchemata *PredictSchemata `protobuf:"bytes,31,opt,name=predict_schemata,json=predictSchemata,proto3" json:"predict_schemata,omitempty"` +} + +func (x *PublisherModel) Reset() { + *x = PublisherModel{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel) ProtoMessage() {} + +func (x *PublisherModel) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel.ProtoReflect.Descriptor instead. +func (*PublisherModel) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0} +} + +func (x *PublisherModel) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PublisherModel) GetVersionId() string { + if x != nil { + return x.VersionId + } + return "" +} + +func (x *PublisherModel) GetOpenSourceCategory() PublisherModel_OpenSourceCategory { + if x != nil { + return x.OpenSourceCategory + } + return PublisherModel_OPEN_SOURCE_CATEGORY_UNSPECIFIED +} + +func (x *PublisherModel) GetSupportedActions() *PublisherModel_CallToAction { + if x != nil { + return x.SupportedActions + } + return nil +} + +func (x *PublisherModel) GetFrameworks() []string { + if x != nil { + return x.Frameworks + } + return nil +} + +func (x *PublisherModel) GetPublisherModelTemplate() string { + if x != nil { + return x.PublisherModelTemplate + } + return "" +} + +func (x *PublisherModel) GetPredictSchemata() *PredictSchemata { + if x != nil { + return x.PredictSchemata + } + return nil +} + +// Reference to a resource. +type PublisherModel_ResourceReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Reference: + // *PublisherModel_ResourceReference_Uri + // *PublisherModel_ResourceReference_ResourceName + Reference isPublisherModel_ResourceReference_Reference `protobuf_oneof:"reference"` +} + +func (x *PublisherModel_ResourceReference) Reset() { + *x = PublisherModel_ResourceReference{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_ResourceReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_ResourceReference) ProtoMessage() {} + +func (x *PublisherModel_ResourceReference) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel_ResourceReference.ProtoReflect.Descriptor instead. +func (*PublisherModel_ResourceReference) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *PublisherModel_ResourceReference) GetReference() isPublisherModel_ResourceReference_Reference { + if m != nil { + return m.Reference + } + return nil +} + +func (x *PublisherModel_ResourceReference) GetUri() string { + if x, ok := x.GetReference().(*PublisherModel_ResourceReference_Uri); ok { + return x.Uri + } + return "" +} + +func (x *PublisherModel_ResourceReference) GetResourceName() string { + if x, ok := x.GetReference().(*PublisherModel_ResourceReference_ResourceName); ok { + return x.ResourceName + } + return "" +} + +type isPublisherModel_ResourceReference_Reference interface { + isPublisherModel_ResourceReference_Reference() +} + +type PublisherModel_ResourceReference_Uri struct { + // The URI of the resource. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"` +} + +type PublisherModel_ResourceReference_ResourceName struct { + // The resource name of the GCP resource. + ResourceName string `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3,oneof"` +} + +func (*PublisherModel_ResourceReference_Uri) isPublisherModel_ResourceReference_Reference() {} + +func (*PublisherModel_ResourceReference_ResourceName) isPublisherModel_ResourceReference_Reference() { +} + +// A named piece of documentation. +type PublisherModel_Documentation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA, + // NODE.JS, etc.. + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Required. Content of this piece of document (in Markdown format). + Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *PublisherModel_Documentation) Reset() { + *x = PublisherModel_Documentation{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_Documentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_Documentation) ProtoMessage() {} + +func (x *PublisherModel_Documentation) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel_Documentation.ProtoReflect.Descriptor instead. +func (*PublisherModel_Documentation) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *PublisherModel_Documentation) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *PublisherModel_Documentation) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +// Actions could take on this Publisher Model. +type PublisherModel_CallToAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. To view Rest API docs. + ViewRestApi *PublisherModel_CallToAction_ViewRestApi `protobuf:"bytes,1,opt,name=view_rest_api,json=viewRestApi,proto3" json:"view_rest_api,omitempty"` + // Optional. Open notebook of the PublisherModel. + OpenNotebook *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,2,opt,name=open_notebook,json=openNotebook,proto3" json:"open_notebook,omitempty"` + // Optional. Create application using the PublisherModel. + CreateApplication *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,3,opt,name=create_application,json=createApplication,proto3" json:"create_application,omitempty"` + // Optional. Open fine-tuning pipeline of the PublisherModel. + OpenFineTuningPipeline *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,4,opt,name=open_fine_tuning_pipeline,json=openFineTuningPipeline,proto3" json:"open_fine_tuning_pipeline,omitempty"` + // Optional. Open prompt-tuning pipeline of the PublisherModel. + OpenPromptTuningPipeline *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,5,opt,name=open_prompt_tuning_pipeline,json=openPromptTuningPipeline,proto3" json:"open_prompt_tuning_pipeline,omitempty"` + // Optional. Open Genie / Playground. + OpenGenie *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,6,opt,name=open_genie,json=openGenie,proto3" json:"open_genie,omitempty"` + // Optional. Deploy the PublisherModel to Vertex Endpoint. + Deploy *PublisherModel_CallToAction_Deploy `protobuf:"bytes,7,opt,name=deploy,proto3" json:"deploy,omitempty"` + // Optional. Open in Generation AI Studio. + OpenGenerationAiStudio *PublisherModel_CallToAction_RegionalResourceReferences `protobuf:"bytes,8,opt,name=open_generation_ai_studio,json=openGenerationAiStudio,proto3" json:"open_generation_ai_studio,omitempty"` +} + +func (x *PublisherModel_CallToAction) Reset() { + *x = PublisherModel_CallToAction{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_CallToAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_CallToAction) ProtoMessage() {} + +func (x *PublisherModel_CallToAction) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel_CallToAction.ProtoReflect.Descriptor instead. +func (*PublisherModel_CallToAction) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *PublisherModel_CallToAction) GetViewRestApi() *PublisherModel_CallToAction_ViewRestApi { + if x != nil { + return x.ViewRestApi + } + return nil +} + +func (x *PublisherModel_CallToAction) GetOpenNotebook() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.OpenNotebook + } + return nil +} + +func (x *PublisherModel_CallToAction) GetCreateApplication() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.CreateApplication + } + return nil +} + +func (x *PublisherModel_CallToAction) GetOpenFineTuningPipeline() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.OpenFineTuningPipeline + } + return nil +} + +func (x *PublisherModel_CallToAction) GetOpenPromptTuningPipeline() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.OpenPromptTuningPipeline + } + return nil +} + +func (x *PublisherModel_CallToAction) GetOpenGenie() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.OpenGenie + } + return nil +} + +func (x *PublisherModel_CallToAction) GetDeploy() *PublisherModel_CallToAction_Deploy { + if x != nil { + return x.Deploy + } + return nil +} + +func (x *PublisherModel_CallToAction) GetOpenGenerationAiStudio() *PublisherModel_CallToAction_RegionalResourceReferences { + if x != nil { + return x.OpenGenerationAiStudio + } + return nil +} + +// The regional resource name or the URI. Key is region, e.g., +// us-central1, europe-west2, global, etc.. +type PublisherModel_CallToAction_RegionalResourceReferences struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + References map[string]*PublisherModel_ResourceReference `protobuf:"bytes,1,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Required. The title of the regional resource reference. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` +} + +func (x *PublisherModel_CallToAction_RegionalResourceReferences) Reset() { + *x = PublisherModel_CallToAction_RegionalResourceReferences{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_CallToAction_RegionalResourceReferences) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_CallToAction_RegionalResourceReferences) ProtoMessage() {} + +func (x *PublisherModel_CallToAction_RegionalResourceReferences) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel_CallToAction_RegionalResourceReferences.ProtoReflect.Descriptor instead. +func (*PublisherModel_CallToAction_RegionalResourceReferences) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 2, 0} +} + +func (x *PublisherModel_CallToAction_RegionalResourceReferences) GetReferences() map[string]*PublisherModel_ResourceReference { + if x != nil { + return x.References + } + return nil +} + +func (x *PublisherModel_CallToAction_RegionalResourceReferences) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +// Rest API docs. +type PublisherModel_CallToAction_ViewRestApi struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. + Documentations []*PublisherModel_Documentation `protobuf:"bytes,1,rep,name=documentations,proto3" json:"documentations,omitempty"` + // Required. The title of the view rest API. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` +} + +func (x *PublisherModel_CallToAction_ViewRestApi) Reset() { + *x = PublisherModel_CallToAction_ViewRestApi{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_CallToAction_ViewRestApi) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_CallToAction_ViewRestApi) ProtoMessage() {} + +func (x *PublisherModel_CallToAction_ViewRestApi) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_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 PublisherModel_CallToAction_ViewRestApi.ProtoReflect.Descriptor instead. +func (*PublisherModel_CallToAction_ViewRestApi) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 2, 1} +} + +func (x *PublisherModel_CallToAction_ViewRestApi) GetDocumentations() []*PublisherModel_Documentation { + if x != nil { + return x.Documentations + } + return nil +} + +func (x *PublisherModel_CallToAction_ViewRestApi) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +// Model metadata that is needed for UploadModel or +// DeployModel/CreateEndpoint requests. +type PublisherModel_CallToAction_Deploy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prediction (for example, the machine) resources that the + // DeployedModel uses. + // + // Types that are assignable to PredictionResources: + // *PublisherModel_CallToAction_Deploy_DedicatedResources + // *PublisherModel_CallToAction_Deploy_AutomaticResources + // *PublisherModel_CallToAction_Deploy_SharedResources + PredictionResources isPublisherModel_CallToAction_Deploy_PredictionResources `protobuf_oneof:"prediction_resources"` + // Optional. Default model display name. + ModelDisplayName string `protobuf:"bytes,1,opt,name=model_display_name,json=modelDisplayName,proto3" json:"model_display_name,omitempty"` + // Optional. Large model reference. When this is set, model_artifact_spec + // is not needed. + LargeModelReference *LargeModelReference `protobuf:"bytes,2,opt,name=large_model_reference,json=largeModelReference,proto3" json:"large_model_reference,omitempty"` + // Optional. The specification of the container that is to be used when + // deploying this Model in Vertex AI. Not present for Large Models. + ContainerSpec *ModelContainerSpec `protobuf:"bytes,3,opt,name=container_spec,json=containerSpec,proto3" json:"container_spec,omitempty"` + // Optional. The path to the directory containing the Model artifact and + // any of its supporting files. + ArtifactUri string `protobuf:"bytes,4,opt,name=artifact_uri,json=artifactUri,proto3" json:"artifact_uri,omitempty"` + // Required. The title of the regional resource reference. + Title string `protobuf:"bytes,8,opt,name=title,proto3" json:"title,omitempty"` +} + +func (x *PublisherModel_CallToAction_Deploy) Reset() { + *x = PublisherModel_CallToAction_Deploy{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublisherModel_CallToAction_Deploy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherModel_CallToAction_Deploy) ProtoMessage() {} + +func (x *PublisherModel_CallToAction_Deploy) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublisherModel_CallToAction_Deploy.ProtoReflect.Descriptor instead. +func (*PublisherModel_CallToAction_Deploy) Descriptor() ([]byte, []int) { + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP(), []int{0, 2, 2} +} + +func (m *PublisherModel_CallToAction_Deploy) GetPredictionResources() isPublisherModel_CallToAction_Deploy_PredictionResources { + if m != nil { + return m.PredictionResources + } + return nil +} + +func (x *PublisherModel_CallToAction_Deploy) GetDedicatedResources() *DedicatedResources { + if x, ok := x.GetPredictionResources().(*PublisherModel_CallToAction_Deploy_DedicatedResources); ok { + return x.DedicatedResources + } + return nil +} + +func (x *PublisherModel_CallToAction_Deploy) GetAutomaticResources() *AutomaticResources { + if x, ok := x.GetPredictionResources().(*PublisherModel_CallToAction_Deploy_AutomaticResources); ok { + return x.AutomaticResources + } + return nil +} + +func (x *PublisherModel_CallToAction_Deploy) GetSharedResources() string { + if x, ok := x.GetPredictionResources().(*PublisherModel_CallToAction_Deploy_SharedResources); ok { + return x.SharedResources + } + return "" +} + +func (x *PublisherModel_CallToAction_Deploy) GetModelDisplayName() string { + if x != nil { + return x.ModelDisplayName + } + return "" +} + +func (x *PublisherModel_CallToAction_Deploy) GetLargeModelReference() *LargeModelReference { + if x != nil { + return x.LargeModelReference + } + return nil +} + +func (x *PublisherModel_CallToAction_Deploy) GetContainerSpec() *ModelContainerSpec { + if x != nil { + return x.ContainerSpec + } + return nil +} + +func (x *PublisherModel_CallToAction_Deploy) GetArtifactUri() string { + if x != nil { + return x.ArtifactUri + } + return "" +} + +func (x *PublisherModel_CallToAction_Deploy) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +type isPublisherModel_CallToAction_Deploy_PredictionResources interface { + isPublisherModel_CallToAction_Deploy_PredictionResources() +} + +type PublisherModel_CallToAction_Deploy_DedicatedResources struct { + // A description of resources that are dedicated to the DeployedModel, + // and that need a higher degree of manual configuration. + DedicatedResources *DedicatedResources `protobuf:"bytes,5,opt,name=dedicated_resources,json=dedicatedResources,proto3,oneof"` +} + +type PublisherModel_CallToAction_Deploy_AutomaticResources struct { + // A description of resources that to large degree are decided by Vertex + // AI, and require only a modest additional configuration. + AutomaticResources *AutomaticResources `protobuf:"bytes,6,opt,name=automatic_resources,json=automaticResources,proto3,oneof"` +} + +type PublisherModel_CallToAction_Deploy_SharedResources struct { + // The resource name of the shared DeploymentResourcePool to deploy on. + // Format: + // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` + SharedResources string `protobuf:"bytes,7,opt,name=shared_resources,json=sharedResources,proto3,oneof"` +} + +func (*PublisherModel_CallToAction_Deploy_DedicatedResources) isPublisherModel_CallToAction_Deploy_PredictionResources() { +} + +func (*PublisherModel_CallToAction_Deploy_AutomaticResources) isPublisherModel_CallToAction_Deploy_PredictionResources() { +} + +func (*PublisherModel_CallToAction_Deploy_SharedResources) isPublisherModel_CallToAction_Deploy_PredictionResources() { +} + +var File_google_cloud_aiplatform_v1beta1_publisher_model_proto protoreflect.FileDescriptor + +var file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x69, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 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, 0x37, 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, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x69, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x18, 0x0a, 0x0e, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x05, 0xe0, + 0x41, 0x03, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x79, 0x0a, + 0x14, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x61, 0x74, + 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 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, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x11, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, + 0x01, 0x28, 0x0b, 0x32, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0a, 0x66, 0x72, 0x61, 0x6d, + 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0a, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x40, 0x0a, + 0x18, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xe0, 0x41, 0x05, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x60, 0x0a, 0x10, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x74, 0x61, 0x18, 0x1f, 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, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x74, + 0x61, 0x1a, 0x5b, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x1a, 0x49, + 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x8d, 0x11, 0x0a, 0x0c, 0x43, 0x61, + 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x71, 0x0a, 0x0d, 0x76, 0x69, + 0x65, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x48, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x56, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0b, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x81, 0x01, + 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x12, 0x8b, 0x01, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, + 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x97, 0x01, 0x0a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x66, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x75, + 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x57, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x16, 0x6f, 0x70, 0x65, 0x6e, 0x46, 0x69, 0x6e, 0x65, 0x54, 0x75, 0x6e, 0x69, 0x6e, + 0x67, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x9b, 0x01, 0x0a, 0x1b, 0x6f, 0x70, + 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x57, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x18, 0x6f, + 0x70, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x50, + 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x7b, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x6e, 0x5f, + 0x67, 0x65, 0x6e, 0x69, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 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, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x47, + 0x65, 0x6e, 0x69, 0x65, 0x12, 0x60, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x97, 0x01, 0x0a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x69, 0x5f, 0x73, 0x74, + 0x75, 0x64, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 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, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x16, 0x6f, 0x70, 0x65, 0x6e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x69, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, + 0x1a, 0xc9, 0x02, 0x0a, 0x1a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x8c, 0x01, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x67, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x6f, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, 0x80, 0x01, 0x0a, 0x0f, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x57, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x69, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x94, 0x01, 0x0a, + 0x0b, 0x56, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x6a, 0x0a, 0x0e, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x1a, 0xe3, 0x04, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x66, + 0x0a, 0x13, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x12, 0x64, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, + 0x0a, 0x10, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x12, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6d, + 0x0a, 0x15, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 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, + 0x4c, 0x61, 0x72, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x13, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x5f, 0x0a, + 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x26, + 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x42, 0x16, 0x0a, 0x14, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xdb, 0x01, 0x0a, 0x12, 0x4f, 0x70, + 0x65, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x12, 0x24, 0x0a, 0x20, 0x4f, 0x50, 0x45, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, + 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, + 0x45, 0x54, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x27, 0x47, 0x4f, 0x4f, 0x47, 0x4c, + 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x44, 0x5f, 0x4f, 0x53, 0x53, 0x5f, 0x57, 0x49, 0x54, 0x48, + 0x5f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, + 0x4e, 0x54, 0x10, 0x02, 0x12, 0x30, 0x0a, 0x2c, 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x50, 0x41, + 0x52, 0x54, 0x59, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x44, 0x5f, 0x4f, 0x53, 0x53, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x50, + 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, + 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x44, 0x5f, 0x4f, 0x53, 0x53, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, + 0x54, 0x48, 0x49, 0x52, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x59, 0x5f, 0x4f, 0x57, 0x4e, 0x45, + 0x44, 0x5f, 0x4f, 0x53, 0x53, 0x10, 0x05, 0x3a, 0x54, 0xea, 0x41, 0x51, 0x0a, 0x28, 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, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x25, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, + 0x72, 0x73, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x7d, 0x2f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x7d, 0x42, 0xea, 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, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 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_publisher_model_proto_rawDescOnce sync.Once + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescData = file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDesc +) + +func file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescGZIP() []byte { + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescOnce.Do(func() { + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescData) + }) + return file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDescData +} + +var file_google_cloud_aiplatform_v1beta1_publisher_model_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_google_cloud_aiplatform_v1beta1_publisher_model_proto_goTypes = []interface{}{ + (PublisherModel_OpenSourceCategory)(0), // 0: google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory + (*PublisherModel)(nil), // 1: google.cloud.aiplatform.v1beta1.PublisherModel + (*PublisherModel_ResourceReference)(nil), // 2: google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + (*PublisherModel_Documentation)(nil), // 3: google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + (*PublisherModel_CallToAction)(nil), // 4: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + (*PublisherModel_CallToAction_RegionalResourceReferences)(nil), // 5: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + (*PublisherModel_CallToAction_ViewRestApi)(nil), // 6: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + (*PublisherModel_CallToAction_Deploy)(nil), // 7: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + nil, // 8: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.ReferencesEntry + (*PredictSchemata)(nil), // 9: google.cloud.aiplatform.v1beta1.PredictSchemata + (*DedicatedResources)(nil), // 10: google.cloud.aiplatform.v1beta1.DedicatedResources + (*AutomaticResources)(nil), // 11: google.cloud.aiplatform.v1beta1.AutomaticResources + (*LargeModelReference)(nil), // 12: google.cloud.aiplatform.v1beta1.LargeModelReference + (*ModelContainerSpec)(nil), // 13: google.cloud.aiplatform.v1beta1.ModelContainerSpec +} +var file_google_cloud_aiplatform_v1beta1_publisher_model_proto_depIdxs = []int32{ + 0, // 0: google.cloud.aiplatform.v1beta1.PublisherModel.open_source_category:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.OpenSourceCategory + 4, // 1: google.cloud.aiplatform.v1beta1.PublisherModel.supported_actions:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction + 9, // 2: google.cloud.aiplatform.v1beta1.PublisherModel.predict_schemata:type_name -> google.cloud.aiplatform.v1beta1.PredictSchemata + 6, // 3: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.view_rest_api:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi + 5, // 4: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.open_notebook:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 5, // 5: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.create_application:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 5, // 6: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.open_fine_tuning_pipeline:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 5, // 7: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.open_prompt_tuning_pipeline:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 5, // 8: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.open_genie:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 7, // 9: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.deploy:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy + 5, // 10: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.open_generation_ai_studio:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences + 8, // 11: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.references:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.ReferencesEntry + 3, // 12: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.ViewRestApi.documentations:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.Documentation + 10, // 13: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.dedicated_resources:type_name -> google.cloud.aiplatform.v1beta1.DedicatedResources + 11, // 14: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.automatic_resources:type_name -> google.cloud.aiplatform.v1beta1.AutomaticResources + 12, // 15: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.large_model_reference:type_name -> google.cloud.aiplatform.v1beta1.LargeModelReference + 13, // 16: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.Deploy.container_spec:type_name -> google.cloud.aiplatform.v1beta1.ModelContainerSpec + 2, // 17: google.cloud.aiplatform.v1beta1.PublisherModel.CallToAction.RegionalResourceReferences.ReferencesEntry.value:type_name -> google.cloud.aiplatform.v1beta1.PublisherModel.ResourceReference + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_google_cloud_aiplatform_v1beta1_publisher_model_proto_init() } +func file_google_cloud_aiplatform_v1beta1_publisher_model_proto_init() { + if File_google_cloud_aiplatform_v1beta1_publisher_model_proto != nil { + return + } + file_google_cloud_aiplatform_v1beta1_machine_resources_proto_init() + file_google_cloud_aiplatform_v1beta1_model_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_ResourceReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_Documentation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_CallToAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_CallToAction_RegionalResourceReferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_CallToAction_ViewRestApi); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublisherModel_CallToAction_Deploy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*PublisherModel_ResourceReference_Uri)(nil), + (*PublisherModel_ResourceReference_ResourceName)(nil), + } + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*PublisherModel_CallToAction_Deploy_DedicatedResources)(nil), + (*PublisherModel_CallToAction_Deploy_AutomaticResources)(nil), + (*PublisherModel_CallToAction_Deploy_SharedResources)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_aiplatform_v1beta1_publisher_model_proto_goTypes, + DependencyIndexes: file_google_cloud_aiplatform_v1beta1_publisher_model_proto_depIdxs, + EnumInfos: file_google_cloud_aiplatform_v1beta1_publisher_model_proto_enumTypes, + MessageInfos: file_google_cloud_aiplatform_v1beta1_publisher_model_proto_msgTypes, + }.Build() + File_google_cloud_aiplatform_v1beta1_publisher_model_proto = out.File + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_rawDesc = nil + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_goTypes = nil + file_google_cloud_aiplatform_v1beta1_publisher_model_proto_depIdxs = nil +} diff --git a/aiplatform/apiv1beta1/gapic_metadata.json b/aiplatform/apiv1beta1/gapic_metadata.json index edb0ca69f6e4..97c233c5ee9f 100644 --- a/aiplatform/apiv1beta1/gapic_metadata.json +++ b/aiplatform/apiv1beta1/gapic_metadata.json @@ -2609,6 +2609,130 @@ } } }, + "ModelGardenService": { + "clients": { + "grpc": { + "libraryClient": "ModelGardenClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetPublisherModel": { + "methods": [ + "GetPublisherModel" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + }, + "rest": { + "libraryClient": "ModelGardenClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "GetPublisherModel": { + "methods": [ + "GetPublisherModel" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "WaitOperation": { + "methods": [ + "WaitOperation" + ] + } + } + } + } + }, "ModelService": { "clients": { "grpc": { diff --git a/aiplatform/apiv1beta1/model_garden_client.go b/aiplatform/apiv1beta1/model_garden_client.go new file mode 100755 index 000000000000..6c71c34530ab --- /dev/null +++ b/aiplatform/apiv1beta1/model_garden_client.go @@ -0,0 +1,1287 @@ +// 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 +// +// 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/ioutil" + "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/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newModelGardenClientHook clientHook + +// ModelGardenCallOptions contains the retry settings for each method of ModelGardenClient. +type ModelGardenCallOptions struct { + GetPublisherModel []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 defaultModelGardenGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("aiplatform.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("aiplatform.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultModelGardenCallOptions() *ModelGardenCallOptions { + return &ModelGardenCallOptions{ + GetPublisherModel: []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 defaultModelGardenRESTCallOptions() *ModelGardenCallOptions { + return &ModelGardenCallOptions{ + GetPublisherModel: []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{}, + } +} + +// internalModelGardenClient is an interface that defines the methods available from Vertex AI API. +type internalModelGardenClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + GetPublisherModel(context.Context, *aiplatformpb.GetPublisherModelRequest, ...gax.CallOption) (*aiplatformpb.PublisherModel, 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) +} + +// ModelGardenClient 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. +// +// The interface of Model Garden Service. +type ModelGardenClient struct { + // The internal transport-dependent client. + internalClient internalModelGardenClient + + // The call options for this service. + CallOptions *ModelGardenCallOptions +} + +// 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// GetPublisherModel gets a Model Garden publisher model. +func (c *ModelGardenClient) GetPublisherModel(ctx context.Context, req *aiplatformpb.GetPublisherModelRequest, opts ...gax.CallOption) (*aiplatformpb.PublisherModel, error) { + return c.internalClient.GetPublisherModel(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) 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 *ModelGardenClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.WaitOperation(ctx, req, opts...) +} + +// modelGardenGRPCClient 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 modelGardenGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing ModelGardenClient + CallOptions **ModelGardenCallOptions + + // The gRPC API client. + modelGardenClient aiplatformpb.ModelGardenServiceClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewModelGardenClient creates a new model garden service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// The interface of Model Garden Service. +func NewModelGardenClient(ctx context.Context, opts ...option.ClientOption) (*ModelGardenClient, error) { + clientOpts := defaultModelGardenGRPCClientOptions() + if newModelGardenClientHook != nil { + hookOpts, err := newModelGardenClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := ModelGardenClient{CallOptions: defaultModelGardenCallOptions()} + + c := &modelGardenGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + modelGardenClient: aiplatformpb.NewModelGardenServiceClient(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 *modelGardenGRPCClient) 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 *modelGardenGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("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 *modelGardenGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type modelGardenRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing ModelGardenClient + CallOptions **ModelGardenCallOptions +} + +// NewModelGardenRESTClient creates a new model garden service rest client. +// +// The interface of Model Garden Service. +func NewModelGardenRESTClient(ctx context.Context, opts ...option.ClientOption) (*ModelGardenClient, error) { + clientOpts := append(defaultModelGardenRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultModelGardenRESTCallOptions() + c := &modelGardenRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &ModelGardenClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultModelGardenRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://aiplatform.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://aiplatform.mtls.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 *modelGardenRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("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 *modelGardenRESTClient) 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 *modelGardenRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *modelGardenGRPCClient) GetPublisherModel(ctx context.Context, req *aiplatformpb.GetPublisherModelRequest, opts ...gax.CallOption) (*aiplatformpb.PublisherModel, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetPublisherModel[0:len((*c.CallOptions).GetPublisherModel):len((*c.CallOptions).GetPublisherModel)], opts...) + var resp *aiplatformpb.PublisherModel + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.modelGardenClient.GetPublisherModel(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *modelGardenGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 *modelGardenGRPCClient) WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + 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 +} + +// GetPublisherModel gets a Model Garden publisher model. +func (c *modelGardenRESTClient) GetPublisherModel(ctx context.Context, req *aiplatformpb.GetPublisherModelRequest, opts ...gax.CallOption) (*aiplatformpb.PublisherModel, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta1/%v", req.GetName()) + + params := url.Values{} + if req.GetLanguageCode() != "" { + params.Add("languageCode", fmt.Sprintf("%v", req.GetLanguageCode())) + } + if req.GetView() != 0 { + params.Add("view", fmt.Sprintf("%v", req.GetView())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + opts = append((*c.CallOptions).GetPublisherModel[0:len((*c.CallOptions).GetPublisherModel):len((*c.CallOptions).GetPublisherModel)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &aiplatformpb.PublisherModel{} + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(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 *modelGardenRESTClient) 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. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(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 *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(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 *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(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 *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 *modelGardenRESTClient) 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. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *modelGardenRESTClient) 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. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(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 *modelGardenRESTClient) 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)) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + 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 := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} diff --git a/aiplatform/apiv1beta1/model_garden_client_example_test.go b/aiplatform/apiv1beta1/model_garden_client_example_test.go new file mode 100644 index 000000000000..f3b033cef8d9 --- /dev/null +++ b/aiplatform/apiv1beta1/model_garden_client_example_test.go @@ -0,0 +1,345 @@ +// 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 +// +// 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 ExampleNewModelGardenClient() { + 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.NewModelGardenClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewModelGardenRESTClient() { + 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.NewModelGardenRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleModelGardenClient_GetPublisherModel() { + 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.NewModelGardenClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetPublisherModelRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb#GetPublisherModelRequest. + } + resp, err := c.GetPublisherModel(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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 ExampleModelGardenClient_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.NewModelGardenClient(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/confidentialcomputing/apiv1/snippet_metadata.google.cloud.confidentialcomputing.v1.json b/internal/generated/snippets/confidentialcomputing/apiv1/snippet_metadata.google.cloud.confidentialcomputing.v1.json index 1da546af5de3..d14f3e17337b 100644 --- a/internal/generated/snippets/confidentialcomputing/apiv1/snippet_metadata.google.cloud.confidentialcomputing.v1.json +++ b/internal/generated/snippets/confidentialcomputing/apiv1/snippet_metadata.google.cloud.confidentialcomputing.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/confidentialcomputing/apiv1", - "version": "0.1.0", + "version": "0.2.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/confidentialcomputing/apiv1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json b/internal/generated/snippets/confidentialcomputing/apiv1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json index bc148948f008..c335cc71ba4a 100644 --- a/internal/generated/snippets/confidentialcomputing/apiv1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json +++ b/internal/generated/snippets/confidentialcomputing/apiv1alpha1/snippet_metadata.google.cloud.confidentialcomputing.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/confidentialcomputing/apiv1alpha1", - "version": "0.1.0", + "version": "0.2.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/storageinsights/apiv1/snippet_metadata.google.cloud.storageinsights.v1.json b/internal/generated/snippets/storageinsights/apiv1/snippet_metadata.google.cloud.storageinsights.v1.json index da67e8fc9079..c7be45d03d9f 100644 --- a/internal/generated/snippets/storageinsights/apiv1/snippet_metadata.google.cloud.storageinsights.v1.json +++ b/internal/generated/snippets/storageinsights/apiv1/snippet_metadata.google.cloud.storageinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/storageinsights/apiv1", - "version": "0.0.0", + "version": "0.1.0", "language": "GO", "apis": [ { diff --git a/talent/apiv4/job_client.go b/talent/apiv4/job_client.go index ae947a34340c..dd4082ae0272 100755 --- a/talent/apiv4/job_client.go +++ b/talent/apiv4/job_client.go @@ -736,11 +736,6 @@ func (c *jobGRPCClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobs } func (c *jobGRPCClient) SearchJobsForAlert(ctx context.Context, req *talentpb.SearchJobsRequest, opts ...gax.CallOption) (*talentpb.SearchJobsResponse, error) { - if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { - cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond) - defer cancel() - ctx = cctx - } md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md)