diff --git a/.librarian/state.yaml b/.librarian/state.yaml index e7f6d67681d6..28689984f71c 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -408,6 +408,29 @@ libraries: release_exclude_paths: - internal/generated/snippets/apikeys/ tag_format: '{id}/v{version}' + - id: apiregistry + version: 0.0.0 + last_generated_commit: b607ece2e97f19a8f105a6cd40368da68e7bc613 + apis: + - path: google/cloud/apiregistry/v1beta + service_config: cloudapiregistry_v1beta.yaml + source_roots: + - apiregistry + - internal/generated/snippets/apiregistry + preserve_regex: [] + remove_regex: + - ^internal/generated/snippets/apiregistry/ + - ^apiregistry/apiv1beta/[^/]*_client\.go$ + - ^apiregistry/apiv1beta/[^/]*_client_example_go123_test\.go$ + - ^apiregistry/apiv1beta/[^/]*_client_example_test\.go$ + - ^apiregistry/apiv1beta/auxiliary\.go$ + - ^apiregistry/apiv1beta/auxiliary_go123\.go$ + - ^apiregistry/apiv1beta/doc\.go$ + - ^apiregistry/apiv1beta/gapic_metadata\.json$ + - ^apiregistry/apiv1beta/helpers\.go$ + - ^apiregistry/apiv1beta/\.repo-metadata\.json$ + - ^apiregistry/apiv1beta/apiregistrypb/.*$ + tag_format: '{id}/v{version}' - id: appengine version: 1.9.7 last_generated_commit: c288189b43c016dd3cf1ec73ce3cadee8b732f07 diff --git a/apiregistry/CHANGES.md b/apiregistry/CHANGES.md new file mode 100644 index 000000000000..b671f0bbcdd2 --- /dev/null +++ b/apiregistry/CHANGES.md @@ -0,0 +1 @@ +# Changes diff --git a/apiregistry/README.md b/apiregistry/README.md new file mode 100644 index 000000000000..efb1f4967393 --- /dev/null +++ b/apiregistry/README.md @@ -0,0 +1,55 @@ +# Cloud API Registry API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/apiregistry.svg)](https://pkg.go.dev/cloud.google.com/go/apiregistry) + +Go Client Library for Cloud API Registry API. + +## Install + +```bash +go get cloud.google.com/go/apiregistry +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +### Which package to use? + +Generated client library surfaces can be found in packages who's import path +ends in `.../apivXXX`. The `XXX` could be something like `1` or `2` in the case +of a stable service backend or may be like `1beta2` or `2beta` in the case of a +more experimental service backend. Because of this fact, a given module can have +multiple clients for different service backends. In these cases it is generally +recommended to use clients with stable service backends, with import suffixes like +`apiv1`, unless you need to use features that are only present in a beta backend +or there is not yet a stable backend available. + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/apiregistry/apiv1beta/.repo-metadata.json b/apiregistry/apiv1beta/.repo-metadata.json new file mode 100644 index 000000000000..726f20995c68 --- /dev/null +++ b/apiregistry/apiv1beta/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "cloudapiregistry", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apiregistry/latest/apiv1beta", + "client_library_type": "generated", + "description": "Cloud API Registry API", + "distribution_name": "cloud.google.com/go/apiregistry/apiv1beta", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "preview" +} diff --git a/apiregistry/apiv1beta/apiregistrypb/common.pb.go b/apiregistry/apiv1beta/apiregistrypb/common.pb.go new file mode 100644 index 000000000000..9e82c6963d9d --- /dev/null +++ b/apiregistry/apiv1beta/apiregistrypb/common.pb.go @@ -0,0 +1,167 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/apiregistry/v1beta/common.proto + +package apiregistrypb + +import ( + reflect "reflect" + sync "sync" + + 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) +) + +// The state of McpServer resource. +type State int32 + +const ( + // The McpServer state is unspecified. + State_STATE_UNSPECIFIED State = 0 + // The McpServer is enabled. + State_ENABLED State = 1 + // The McpServer is disabled. + State_DISABLED State = 2 +) + +// Enum value maps for State. +var ( + State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "ENABLED", + 2: "DISABLED", + } + State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x State) Enum() *State { + p := new(State) + *p = x + return p +} + +func (x State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_apiregistry_v1beta_common_proto_enumTypes[0].Descriptor() +} + +func (State) Type() protoreflect.EnumType { + return &file_google_cloud_apiregistry_v1beta_common_proto_enumTypes[0] +} + +func (x State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use State.Descriptor instead. +func (State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_common_proto_rawDescGZIP(), []int{0} +} + +var File_google_cloud_apiregistry_v1beta_common_proto protoreflect.FileDescriptor + +var file_google_cloud_apiregistry_v1beta_common_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2a, + 0x39, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x42, 0xe4, 0x01, 0x0a, 0x23, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x61, 0x70, 0x69, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x70, 0x62, 0x3b, 0x61, 0x70, 0x69, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0xea, 0x02, 0x22, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x70, + 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_apiregistry_v1beta_common_proto_rawDescOnce sync.Once + file_google_cloud_apiregistry_v1beta_common_proto_rawDescData = file_google_cloud_apiregistry_v1beta_common_proto_rawDesc +) + +func file_google_cloud_apiregistry_v1beta_common_proto_rawDescGZIP() []byte { + file_google_cloud_apiregistry_v1beta_common_proto_rawDescOnce.Do(func() { + file_google_cloud_apiregistry_v1beta_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apiregistry_v1beta_common_proto_rawDescData) + }) + return file_google_cloud_apiregistry_v1beta_common_proto_rawDescData +} + +var file_google_cloud_apiregistry_v1beta_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_apiregistry_v1beta_common_proto_goTypes = []any{ + (State)(0), // 0: google.cloud.apiregistry.v1beta.State +} +var file_google_cloud_apiregistry_v1beta_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_apiregistry_v1beta_common_proto_init() } +func file_google_cloud_apiregistry_v1beta_common_proto_init() { + if File_google_cloud_apiregistry_v1beta_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_apiregistry_v1beta_common_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_apiregistry_v1beta_common_proto_goTypes, + DependencyIndexes: file_google_cloud_apiregistry_v1beta_common_proto_depIdxs, + EnumInfos: file_google_cloud_apiregistry_v1beta_common_proto_enumTypes, + }.Build() + File_google_cloud_apiregistry_v1beta_common_proto = out.File + file_google_cloud_apiregistry_v1beta_common_proto_rawDesc = nil + file_google_cloud_apiregistry_v1beta_common_proto_goTypes = nil + file_google_cloud_apiregistry_v1beta_common_proto_depIdxs = nil +} diff --git a/apiregistry/apiv1beta/apiregistrypb/resources.pb.go b/apiregistry/apiv1beta/apiregistrypb/resources.pb.go new file mode 100644 index 000000000000..360f5a81ca13 --- /dev/null +++ b/apiregistry/apiv1beta/apiregistrypb/resources.pb.go @@ -0,0 +1,427 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/apiregistry/v1beta/resources.proto + +package apiregistrypb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +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) +) + +// Represents an MCP Server. MCP Servers act as endpoints that expose a +// collection of tools that can be invoked by agents. +type McpServer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The resource name of the MCP Server. + // Format: + // `projects/{project}/locations/{location}/mcpServers/{mcp_server}`. + // Example: + // projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp + // for 1p + // projects/12345/locations/us-central1/mcpServers/apphub:starbucks for + // 2p + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A human readable name for the MCP server. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. A human-readable description of the MCP Server's functionality. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp]. + Urls []string `protobuf:"bytes,4,rep,name=urls,proto3" json:"urls,omitempty"` + // The capabilities that a server may support. Known capabilities defined in + // https://modelcontextprotocol.io/specification/2025-06-18/schema#servercapabilities + // and additional capabilities defined by the servers. + Capabilities *structpb.Struct `protobuf:"bytes,6,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + // Output only. The state of the MCP Server. + State State `protobuf:"varint,7,opt,name=state,proto3,enum=google.cloud.apiregistry.v1beta.State" json:"state,omitempty"` +} + +func (x *McpServer) Reset() { + *x = McpServer{} + mi := &file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *McpServer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*McpServer) ProtoMessage() {} + +func (x *McpServer) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use McpServer.ProtoReflect.Descriptor instead. +func (*McpServer) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_resources_proto_rawDescGZIP(), []int{0} +} + +func (x *McpServer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *McpServer) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *McpServer) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *McpServer) GetUrls() []string { + if x != nil { + return x.Urls + } + return nil +} + +func (x *McpServer) GetCapabilities() *structpb.Struct { + if x != nil { + return x.Capabilities + } + return nil +} + +func (x *McpServer) GetState() State { + if x != nil { + return x.State + } + return State_STATE_UNSPECIFIED +} + +// Message describing McpTool object +type McpTool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The resource name of the McpTool. + // Format: + // `projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}`. + // Example: + // projects/12345/locations/us-central1/mcpServers/google:bigquery.googleapis.com:mcp/mcpTools/insert_job + // for 1p + // projects/12345/locations/us-central1/mcpServers/apphub:starbucks/mcpTools/order_pizza + // for 2p + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. A human-readable name for the tool, suitable for display. + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // A human-readable description of the tool's functionality. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Automatically populated reference to MCP Server. Helpful when multiple + // tools are requested across different MCP Servers. + McpServerUrls []string `protobuf:"bytes,4,rep,name=mcp_server_urls,json=mcpServerUrls,proto3" json:"mcp_server_urls,omitempty"` + // A JSON Schema object defining the expected parameters for invoking the + // tool. + InputSchema *structpb.Struct `protobuf:"bytes,5,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"` + // Optional. A JSON Schema object defining the expected structure of the + // tool's output. + OutputSchema *structpb.Struct `protobuf:"bytes,6,opt,name=output_schema,json=outputSchema,proto3" json:"output_schema,omitempty"` + // Optional key-value object that allows developers to provide additional + // information regarding tool properties, behavior, and usage best practices. + // Annotations or tags to facilitate semantic search across tools ("semantic + // tags") are not in the MVP scope. When implemented, the first set of + // supported annotations will likely be the standard, predefined annotations + // from the open-source MCP spec. These include: + // - title: A human-readable title for the tool, useful for UI display. + // - readOnlyHint: If true, indicates the tool does not modify its + // environment. + // - destructiveHint: If true, the tool may perform destructive updates + // (only meaningful when readOnlyHint is false). + // - idempotentHint: If true, calling the tool repeatedly with the same + // arguments has no additional effect (only meaningful when readOnlyHint is + // false). + // - openWorldHint: If true, the tool may interact with an "open world" of + // external entities. + Annotations *structpb.Struct `protobuf:"bytes,7,opt,name=annotations,proto3" json:"annotations,omitempty"` +} + +func (x *McpTool) Reset() { + *x = McpTool{} + mi := &file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *McpTool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*McpTool) ProtoMessage() {} + +func (x *McpTool) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use McpTool.ProtoReflect.Descriptor instead. +func (*McpTool) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_resources_proto_rawDescGZIP(), []int{1} +} + +func (x *McpTool) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *McpTool) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *McpTool) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *McpTool) GetMcpServerUrls() []string { + if x != nil { + return x.McpServerUrls + } + return nil +} + +func (x *McpTool) GetInputSchema() *structpb.Struct { + if x != nil { + return x.InputSchema + } + return nil +} + +func (x *McpTool) GetOutputSchema() *structpb.Struct { + if x != nil { + return x.OutputSchema + } + return nil +} + +func (x *McpTool) GetAnnotations() *structpb.Struct { + if x != nil { + return x.Annotations + } + return nil +} + +var File_google_cloud_apiregistry_v1beta_resources_proto protoreflect.FileDescriptor + +var file_google_cloud_apiregistry_v1beta_resources_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 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, 0x2c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, 0x70, 0x69, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x03, 0x0a, 0x09, 0x4d, + 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x75, 0x72, 0x6c, 0x73, 0x12, 0x3b, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x3a, 0xe6, 0x01, 0xea, 0x41, 0xe2, 0x01, 0x0a, 0x29, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4d, 0x63, 0x70, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x5d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x61, 0x70, 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, + 0x70, 0x69, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x6d, 0x63, + 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x7d, 0x12, 0x3f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6d, + 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6d, 0x63, 0x70, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x7d, 0x2a, 0x0a, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x32, 0x09, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0xd4, 0x04, + 0x0a, 0x07, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, + 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x55, 0x72, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x3c, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x39, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x88, 0x02, 0xea, 0x41, 0x84, 0x02, + 0x0a, 0x27, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x12, 0x71, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2f, 0x61, 0x70, 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2f, 0x7b, 0x61, 0x70, 0x69, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, + 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6d, 0x63, 0x70, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x7d, 0x2f, 0x6d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, + 0x73, 0x2f, 0x7b, 0x6d, 0x63, 0x70, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x7d, 0x12, 0x53, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2f, 0x7b, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x7d, 0x2f, 0x6d, 0x63, + 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, 0x6d, 0x63, 0x70, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, + 0x7d, 0x2a, 0x08, 0x6d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x32, 0x07, 0x6d, 0x63, 0x70, + 0x54, 0x6f, 0x6f, 0x6c, 0x42, 0xe7, 0x01, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x0e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x70, 0x62, 0x3b, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_apiregistry_v1beta_resources_proto_rawDescOnce sync.Once + file_google_cloud_apiregistry_v1beta_resources_proto_rawDescData = file_google_cloud_apiregistry_v1beta_resources_proto_rawDesc +) + +func file_google_cloud_apiregistry_v1beta_resources_proto_rawDescGZIP() []byte { + file_google_cloud_apiregistry_v1beta_resources_proto_rawDescOnce.Do(func() { + file_google_cloud_apiregistry_v1beta_resources_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apiregistry_v1beta_resources_proto_rawDescData) + }) + return file_google_cloud_apiregistry_v1beta_resources_proto_rawDescData +} + +var file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_apiregistry_v1beta_resources_proto_goTypes = []any{ + (*McpServer)(nil), // 0: google.cloud.apiregistry.v1beta.McpServer + (*McpTool)(nil), // 1: google.cloud.apiregistry.v1beta.McpTool + (*structpb.Struct)(nil), // 2: google.protobuf.Struct + (State)(0), // 3: google.cloud.apiregistry.v1beta.State +} +var file_google_cloud_apiregistry_v1beta_resources_proto_depIdxs = []int32{ + 2, // 0: google.cloud.apiregistry.v1beta.McpServer.capabilities:type_name -> google.protobuf.Struct + 3, // 1: google.cloud.apiregistry.v1beta.McpServer.state:type_name -> google.cloud.apiregistry.v1beta.State + 2, // 2: google.cloud.apiregistry.v1beta.McpTool.input_schema:type_name -> google.protobuf.Struct + 2, // 3: google.cloud.apiregistry.v1beta.McpTool.output_schema:type_name -> google.protobuf.Struct + 2, // 4: google.cloud.apiregistry.v1beta.McpTool.annotations:type_name -> google.protobuf.Struct + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_google_cloud_apiregistry_v1beta_resources_proto_init() } +func file_google_cloud_apiregistry_v1beta_resources_proto_init() { + if File_google_cloud_apiregistry_v1beta_resources_proto != nil { + return + } + file_google_cloud_apiregistry_v1beta_common_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_apiregistry_v1beta_resources_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_apiregistry_v1beta_resources_proto_goTypes, + DependencyIndexes: file_google_cloud_apiregistry_v1beta_resources_proto_depIdxs, + MessageInfos: file_google_cloud_apiregistry_v1beta_resources_proto_msgTypes, + }.Build() + File_google_cloud_apiregistry_v1beta_resources_proto = out.File + file_google_cloud_apiregistry_v1beta_resources_proto_rawDesc = nil + file_google_cloud_apiregistry_v1beta_resources_proto_goTypes = nil + file_google_cloud_apiregistry_v1beta_resources_proto_depIdxs = nil +} diff --git a/apiregistry/apiv1beta/apiregistrypb/service.pb.go b/apiregistry/apiv1beta/apiregistrypb/service.pb.go new file mode 100644 index 000000000000..0e392c75082d --- /dev/null +++ b/apiregistry/apiv1beta/apiregistrypb/service.pb.go @@ -0,0 +1,656 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/apiregistry/v1beta/service.proto + +package apiregistrypb + +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) +) + +// Message for getting a McpServer +type GetMcpServerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetMcpServerRequest) Reset() { + *x = GetMcpServerRequest{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMcpServerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMcpServerRequest) ProtoMessage() {} + +func (x *GetMcpServerRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMcpServerRequest.ProtoReflect.Descriptor instead. +func (*GetMcpServerRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetMcpServerRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Message for requesting list of McpServers +type ListMcpServersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent value for ListMcpServersRequest + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results the server should return. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Filtering results + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Hint for how to order the results + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListMcpServersRequest) Reset() { + *x = ListMcpServersRequest{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMcpServersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMcpServersRequest) ProtoMessage() {} + +func (x *ListMcpServersRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMcpServersRequest.ProtoReflect.Descriptor instead. +func (*ListMcpServersRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListMcpServersRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListMcpServersRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListMcpServersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListMcpServersRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListMcpServersRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Message for response to listing McpServers +type ListMcpServersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of McpServer + McpServers []*McpServer `protobuf:"bytes,1,rep,name=mcp_servers,json=mcpServers,proto3" json:"mcp_servers,omitempty"` + // A token identifying a page of results the server should return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListMcpServersResponse) Reset() { + *x = ListMcpServersResponse{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMcpServersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMcpServersResponse) ProtoMessage() {} + +func (x *ListMcpServersResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMcpServersResponse.ProtoReflect.Descriptor instead. +func (*ListMcpServersResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListMcpServersResponse) GetMcpServers() []*McpServer { + if x != nil { + return x.McpServers + } + return nil +} + +func (x *ListMcpServersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListMcpServersResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// Message for getting a McpTool +type GetMcpToolRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetMcpToolRequest) Reset() { + *x = GetMcpToolRequest{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetMcpToolRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMcpToolRequest) ProtoMessage() {} + +func (x *GetMcpToolRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMcpToolRequest.ProtoReflect.Descriptor instead. +func (*GetMcpToolRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetMcpToolRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Message for requesting list of McpTools +type ListMcpToolsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent value for ListMcpToolsRequest + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results the server should return. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Filtering results + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Hint for how to order the results + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListMcpToolsRequest) Reset() { + *x = ListMcpToolsRequest{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMcpToolsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMcpToolsRequest) ProtoMessage() {} + +func (x *ListMcpToolsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMcpToolsRequest.ProtoReflect.Descriptor instead. +func (*ListMcpToolsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListMcpToolsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListMcpToolsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListMcpToolsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListMcpToolsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListMcpToolsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Message for response to listing McpTools +type ListMcpToolsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of McpTool + McpTools []*McpTool `protobuf:"bytes,1,rep,name=mcp_tools,json=mcpTools,proto3" json:"mcp_tools,omitempty"` + // A token identifying a page of results the server should return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListMcpToolsResponse) Reset() { + *x = ListMcpToolsResponse{} + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListMcpToolsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMcpToolsResponse) ProtoMessage() {} + +func (x *ListMcpToolsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_apiregistry_v1beta_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMcpToolsResponse.ProtoReflect.Descriptor instead. +func (*ListMcpToolsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListMcpToolsResponse) GetMcpTools() []*McpTool { + if x != nil { + return x.McpTools + } + return nil +} + +func (x *ListMcpToolsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListMcpToolsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +var File_google_cloud_apiregistry_v1beta_service_proto protoreflect.FileDescriptor + +var file_google_cloud_apiregistry_v1beta_service_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 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, 0x70, + 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x2b, 0x0a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xdd, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x22, 0xaf, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x0b, 0x6d, 0x63, 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0a, + 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x61, 0x62, 0x6c, 0x65, 0x22, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x29, 0x0a, + 0x27, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe1, + 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x29, 0x12, 0x27, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x22, 0xa7, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, + 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x6d, + 0x63, 0x70, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, + 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6d, 0x63, 0x70, 0x54, 0x6f, 0x6f, + 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, + 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x32, 0xef, 0x06, 0x0a, + 0x10, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x12, 0xb3, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x63, 0x70, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x22, 0x41, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x12, 0xb8, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x12, + 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, + 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x22, 0x4c, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, + 0x6d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0xda, 0x41, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x6d, 0x63, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x6d, 0x63, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x1a, 0x53, 0xca, 0x41, 0x1f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 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, 0xdd, + 0x02, 0xea, 0x41, 0x75, 0x0a, 0x2c, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x61, 0x70, 0x69, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x70, 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x45, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x61, 0x70, 0x69, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x69, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x0c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x70, 0x62, 0x3b, 0x61, 0x70, 0x69, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x70, 0x62, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x56, 0x31, 0x42, 0x65, 0x74, 0x61, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x41, 0x70, 0x69, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0xea, 0x02, 0x22, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_apiregistry_v1beta_service_proto_rawDescOnce sync.Once + file_google_cloud_apiregistry_v1beta_service_proto_rawDescData = file_google_cloud_apiregistry_v1beta_service_proto_rawDesc +) + +func file_google_cloud_apiregistry_v1beta_service_proto_rawDescGZIP() []byte { + file_google_cloud_apiregistry_v1beta_service_proto_rawDescOnce.Do(func() { + file_google_cloud_apiregistry_v1beta_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_apiregistry_v1beta_service_proto_rawDescData) + }) + return file_google_cloud_apiregistry_v1beta_service_proto_rawDescData +} + +var file_google_cloud_apiregistry_v1beta_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_google_cloud_apiregistry_v1beta_service_proto_goTypes = []any{ + (*GetMcpServerRequest)(nil), // 0: google.cloud.apiregistry.v1beta.GetMcpServerRequest + (*ListMcpServersRequest)(nil), // 1: google.cloud.apiregistry.v1beta.ListMcpServersRequest + (*ListMcpServersResponse)(nil), // 2: google.cloud.apiregistry.v1beta.ListMcpServersResponse + (*GetMcpToolRequest)(nil), // 3: google.cloud.apiregistry.v1beta.GetMcpToolRequest + (*ListMcpToolsRequest)(nil), // 4: google.cloud.apiregistry.v1beta.ListMcpToolsRequest + (*ListMcpToolsResponse)(nil), // 5: google.cloud.apiregistry.v1beta.ListMcpToolsResponse + (*McpServer)(nil), // 6: google.cloud.apiregistry.v1beta.McpServer + (*McpTool)(nil), // 7: google.cloud.apiregistry.v1beta.McpTool +} +var file_google_cloud_apiregistry_v1beta_service_proto_depIdxs = []int32{ + 6, // 0: google.cloud.apiregistry.v1beta.ListMcpServersResponse.mcp_servers:type_name -> google.cloud.apiregistry.v1beta.McpServer + 7, // 1: google.cloud.apiregistry.v1beta.ListMcpToolsResponse.mcp_tools:type_name -> google.cloud.apiregistry.v1beta.McpTool + 0, // 2: google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpServer:input_type -> google.cloud.apiregistry.v1beta.GetMcpServerRequest + 1, // 3: google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpServers:input_type -> google.cloud.apiregistry.v1beta.ListMcpServersRequest + 3, // 4: google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpTool:input_type -> google.cloud.apiregistry.v1beta.GetMcpToolRequest + 4, // 5: google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpTools:input_type -> google.cloud.apiregistry.v1beta.ListMcpToolsRequest + 6, // 6: google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpServer:output_type -> google.cloud.apiregistry.v1beta.McpServer + 2, // 7: google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpServers:output_type -> google.cloud.apiregistry.v1beta.ListMcpServersResponse + 7, // 8: google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpTool:output_type -> google.cloud.apiregistry.v1beta.McpTool + 5, // 9: google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpTools:output_type -> google.cloud.apiregistry.v1beta.ListMcpToolsResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_google_cloud_apiregistry_v1beta_service_proto_init() } +func file_google_cloud_apiregistry_v1beta_service_proto_init() { + if File_google_cloud_apiregistry_v1beta_service_proto != nil { + return + } + file_google_cloud_apiregistry_v1beta_resources_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_apiregistry_v1beta_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_apiregistry_v1beta_service_proto_goTypes, + DependencyIndexes: file_google_cloud_apiregistry_v1beta_service_proto_depIdxs, + MessageInfos: file_google_cloud_apiregistry_v1beta_service_proto_msgTypes, + }.Build() + File_google_cloud_apiregistry_v1beta_service_proto = out.File + file_google_cloud_apiregistry_v1beta_service_proto_rawDesc = nil + file_google_cloud_apiregistry_v1beta_service_proto_goTypes = nil + file_google_cloud_apiregistry_v1beta_service_proto_depIdxs = nil +} diff --git a/apiregistry/apiv1beta/apiregistrypb/service_grpc.pb.go b/apiregistry/apiv1beta/apiregistrypb/service_grpc.pb.go new file mode 100644 index 000000000000..70402e64f898 --- /dev/null +++ b/apiregistry/apiv1beta/apiregistrypb/service_grpc.pb.go @@ -0,0 +1,241 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/apiregistry/v1beta/service.proto + +package apiregistrypb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + CloudApiRegistry_GetMcpServer_FullMethodName = "/google.cloud.apiregistry.v1beta.CloudApiRegistry/GetMcpServer" + CloudApiRegistry_ListMcpServers_FullMethodName = "/google.cloud.apiregistry.v1beta.CloudApiRegistry/ListMcpServers" + CloudApiRegistry_GetMcpTool_FullMethodName = "/google.cloud.apiregistry.v1beta.CloudApiRegistry/GetMcpTool" + CloudApiRegistry_ListMcpTools_FullMethodName = "/google.cloud.apiregistry.v1beta.CloudApiRegistry/ListMcpTools" +) + +// CloudApiRegistryClient is the client API for CloudApiRegistry service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CloudApiRegistryClient interface { + // Gets a single McpServer. + GetMcpServer(ctx context.Context, in *GetMcpServerRequest, opts ...grpc.CallOption) (*McpServer, error) + // Lists McpServers in a given Project. + ListMcpServers(ctx context.Context, in *ListMcpServersRequest, opts ...grpc.CallOption) (*ListMcpServersResponse, error) + // Gets a single McpTool. + GetMcpTool(ctx context.Context, in *GetMcpToolRequest, opts ...grpc.CallOption) (*McpTool, error) + // Lists McpTools in a given McpServer. + ListMcpTools(ctx context.Context, in *ListMcpToolsRequest, opts ...grpc.CallOption) (*ListMcpToolsResponse, error) +} + +type cloudApiRegistryClient struct { + cc grpc.ClientConnInterface +} + +func NewCloudApiRegistryClient(cc grpc.ClientConnInterface) CloudApiRegistryClient { + return &cloudApiRegistryClient{cc} +} + +func (c *cloudApiRegistryClient) GetMcpServer(ctx context.Context, in *GetMcpServerRequest, opts ...grpc.CallOption) (*McpServer, error) { + out := new(McpServer) + err := c.cc.Invoke(ctx, CloudApiRegistry_GetMcpServer_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudApiRegistryClient) ListMcpServers(ctx context.Context, in *ListMcpServersRequest, opts ...grpc.CallOption) (*ListMcpServersResponse, error) { + out := new(ListMcpServersResponse) + err := c.cc.Invoke(ctx, CloudApiRegistry_ListMcpServers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudApiRegistryClient) GetMcpTool(ctx context.Context, in *GetMcpToolRequest, opts ...grpc.CallOption) (*McpTool, error) { + out := new(McpTool) + err := c.cc.Invoke(ctx, CloudApiRegistry_GetMcpTool_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudApiRegistryClient) ListMcpTools(ctx context.Context, in *ListMcpToolsRequest, opts ...grpc.CallOption) (*ListMcpToolsResponse, error) { + out := new(ListMcpToolsResponse) + err := c.cc.Invoke(ctx, CloudApiRegistry_ListMcpTools_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CloudApiRegistryServer is the server API for CloudApiRegistry service. +// All implementations should embed UnimplementedCloudApiRegistryServer +// for forward compatibility +type CloudApiRegistryServer interface { + // Gets a single McpServer. + GetMcpServer(context.Context, *GetMcpServerRequest) (*McpServer, error) + // Lists McpServers in a given Project. + ListMcpServers(context.Context, *ListMcpServersRequest) (*ListMcpServersResponse, error) + // Gets a single McpTool. + GetMcpTool(context.Context, *GetMcpToolRequest) (*McpTool, error) + // Lists McpTools in a given McpServer. + ListMcpTools(context.Context, *ListMcpToolsRequest) (*ListMcpToolsResponse, error) +} + +// UnimplementedCloudApiRegistryServer should be embedded to have forward compatible implementations. +type UnimplementedCloudApiRegistryServer struct { +} + +func (UnimplementedCloudApiRegistryServer) GetMcpServer(context.Context, *GetMcpServerRequest) (*McpServer, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMcpServer not implemented") +} +func (UnimplementedCloudApiRegistryServer) ListMcpServers(context.Context, *ListMcpServersRequest) (*ListMcpServersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMcpServers not implemented") +} +func (UnimplementedCloudApiRegistryServer) GetMcpTool(context.Context, *GetMcpToolRequest) (*McpTool, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMcpTool not implemented") +} +func (UnimplementedCloudApiRegistryServer) ListMcpTools(context.Context, *ListMcpToolsRequest) (*ListMcpToolsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListMcpTools not implemented") +} + +// UnsafeCloudApiRegistryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CloudApiRegistryServer will +// result in compilation errors. +type UnsafeCloudApiRegistryServer interface { + mustEmbedUnimplementedCloudApiRegistryServer() +} + +func RegisterCloudApiRegistryServer(s grpc.ServiceRegistrar, srv CloudApiRegistryServer) { + s.RegisterService(&CloudApiRegistry_ServiceDesc, srv) +} + +func _CloudApiRegistry_GetMcpServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMcpServerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudApiRegistryServer).GetMcpServer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CloudApiRegistry_GetMcpServer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudApiRegistryServer).GetMcpServer(ctx, req.(*GetMcpServerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudApiRegistry_ListMcpServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMcpServersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudApiRegistryServer).ListMcpServers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CloudApiRegistry_ListMcpServers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudApiRegistryServer).ListMcpServers(ctx, req.(*ListMcpServersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudApiRegistry_GetMcpTool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMcpToolRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudApiRegistryServer).GetMcpTool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CloudApiRegistry_GetMcpTool_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudApiRegistryServer).GetMcpTool(ctx, req.(*GetMcpToolRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudApiRegistry_ListMcpTools_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListMcpToolsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudApiRegistryServer).ListMcpTools(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CloudApiRegistry_ListMcpTools_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudApiRegistryServer).ListMcpTools(ctx, req.(*ListMcpToolsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CloudApiRegistry_ServiceDesc is the grpc.ServiceDesc for CloudApiRegistry service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CloudApiRegistry_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.apiregistry.v1beta.CloudApiRegistry", + HandlerType: (*CloudApiRegistryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMcpServer", + Handler: _CloudApiRegistry_GetMcpServer_Handler, + }, + { + MethodName: "ListMcpServers", + Handler: _CloudApiRegistry_ListMcpServers_Handler, + }, + { + MethodName: "GetMcpTool", + Handler: _CloudApiRegistry_GetMcpTool_Handler, + }, + { + MethodName: "ListMcpTools", + Handler: _CloudApiRegistry_ListMcpTools_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/apiregistry/v1beta/service.proto", +} diff --git a/apiregistry/apiv1beta/auxiliary.go b/apiregistry/apiv1beta/auxiliary.go new file mode 100644 index 000000000000..bddfe991c518 --- /dev/null +++ b/apiregistry/apiv1beta/auxiliary.go @@ -0,0 +1,164 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 apiregistry + +import ( + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// McpServerIterator manages a stream of *apiregistrypb.McpServer. +type McpServerIterator struct { + items []*apiregistrypb.McpServer + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apiregistrypb.McpServer, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *McpServerIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *McpServerIterator) Next() (*apiregistrypb.McpServer, error) { + var item *apiregistrypb.McpServer + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *McpServerIterator) bufLen() int { + return len(it.items) +} + +func (it *McpServerIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// McpToolIterator manages a stream of *apiregistrypb.McpTool. +type McpToolIterator struct { + items []*apiregistrypb.McpTool + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apiregistrypb.McpTool, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *McpToolIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *McpToolIterator) Next() (*apiregistrypb.McpTool, error) { + var item *apiregistrypb.McpTool + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *McpToolIterator) bufLen() int { + return len(it.items) +} + +func (it *McpToolIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/apiregistry/apiv1beta/auxiliary_go123.go b/apiregistry/apiv1beta/auxiliary_go123.go new file mode 100644 index 000000000000..0f8fed76e6fd --- /dev/null +++ b/apiregistry/apiv1beta/auxiliary_go123.go @@ -0,0 +1,45 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. + +//go:build go1.23 + +package apiregistry + +import ( + "iter" + + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + "github.com/googleapis/gax-go/v2/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *McpServerIterator) All() iter.Seq2[*apiregistrypb.McpServer, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *McpToolIterator) All() iter.Seq2[*apiregistrypb.McpTool, error] { + return iterator.RangeAdapter(it.Next) +} diff --git a/apiregistry/apiv1beta/cloud_api_registry_client.go b/apiregistry/apiv1beta/cloud_api_registry_client.go new file mode 100644 index 000000000000..c51ff819b362 --- /dev/null +++ b/apiregistry/apiv1beta/cloud_api_registry_client.go @@ -0,0 +1,1001 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 apiregistry + +import ( + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + "time" + + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newCloudApiRegistryClientHook clientHook + +// CloudApiRegistryCallOptions contains the retry settings for each method of CloudApiRegistryClient. +type CloudApiRegistryCallOptions struct { + GetMcpServer []gax.CallOption + ListMcpServers []gax.CallOption + GetMcpTool []gax.CallOption + ListMcpTools []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption +} + +func defaultCloudApiRegistryGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("cloudapiregistry.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("cloudapiregistry.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("cloudapiregistry.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://cloudapiregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCloudApiRegistryCallOptions() *CloudApiRegistryCallOptions { + return &CloudApiRegistryCallOptions{ + GetMcpServer: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListMcpServers: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetMcpTool: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListMcpTools: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + } +} + +func defaultCloudApiRegistryRESTCallOptions() *CloudApiRegistryCallOptions { + return &CloudApiRegistryCallOptions{ + GetMcpServer: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListMcpServers: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetMcpTool: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + ListMcpTools: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + } +} + +// internalCloudApiRegistryClient is an interface that defines the methods available from Cloud API Registry API. +type internalCloudApiRegistryClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + GetMcpServer(context.Context, *apiregistrypb.GetMcpServerRequest, ...gax.CallOption) (*apiregistrypb.McpServer, error) + ListMcpServers(context.Context, *apiregistrypb.ListMcpServersRequest, ...gax.CallOption) *McpServerIterator + GetMcpTool(context.Context, *apiregistrypb.GetMcpToolRequest, ...gax.CallOption) (*apiregistrypb.McpTool, error) + ListMcpTools(context.Context, *apiregistrypb.ListMcpToolsRequest, ...gax.CallOption) *McpToolIterator + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator +} + +// CloudApiRegistryClient is a client for interacting with Cloud API Registry API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// The Cloud API Registry service provides a central registry for managing API +// Data. +type CloudApiRegistryClient struct { + // The internal transport-dependent client. + internalClient internalCloudApiRegistryClient + + // The call options for this service. + CallOptions *CloudApiRegistryCallOptions +} + +// 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 *CloudApiRegistryClient) 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 *CloudApiRegistryClient) 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 *CloudApiRegistryClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// GetMcpServer gets a single McpServer. +func (c *CloudApiRegistryClient) GetMcpServer(ctx context.Context, req *apiregistrypb.GetMcpServerRequest, opts ...gax.CallOption) (*apiregistrypb.McpServer, error) { + return c.internalClient.GetMcpServer(ctx, req, opts...) +} + +// ListMcpServers lists McpServers in a given Project. +func (c *CloudApiRegistryClient) ListMcpServers(ctx context.Context, req *apiregistrypb.ListMcpServersRequest, opts ...gax.CallOption) *McpServerIterator { + return c.internalClient.ListMcpServers(ctx, req, opts...) +} + +// GetMcpTool gets a single McpTool. +func (c *CloudApiRegistryClient) GetMcpTool(ctx context.Context, req *apiregistrypb.GetMcpToolRequest, opts ...gax.CallOption) (*apiregistrypb.McpTool, error) { + return c.internalClient.GetMcpTool(ctx, req, opts...) +} + +// ListMcpTools lists McpTools in a given McpServer. +func (c *CloudApiRegistryClient) ListMcpTools(ctx context.Context, req *apiregistrypb.ListMcpToolsRequest, opts ...gax.CallOption) *McpToolIterator { + return c.internalClient.ListMcpTools(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *CloudApiRegistryClient) 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 *CloudApiRegistryClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// cloudApiRegistryGRPCClient is a client for interacting with Cloud API Registry API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type cloudApiRegistryGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing CloudApiRegistryClient + CallOptions **CloudApiRegistryCallOptions + + // The gRPC API client. + cloudApiRegistryClient apiregistrypb.CloudApiRegistryClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewCloudApiRegistryClient creates a new cloud api registry client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// The Cloud API Registry service provides a central registry for managing API +// Data. +func NewCloudApiRegistryClient(ctx context.Context, opts ...option.ClientOption) (*CloudApiRegistryClient, error) { + clientOpts := defaultCloudApiRegistryGRPCClientOptions() + if newCloudApiRegistryClientHook != nil { + hookOpts, err := newCloudApiRegistryClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := CloudApiRegistryClient{CallOptions: defaultCloudApiRegistryCallOptions()} + + c := &cloudApiRegistryGRPCClient{ + connPool: connPool, + cloudApiRegistryClient: apiregistrypb.NewCloudApiRegistryClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + 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 *cloudApiRegistryGRPCClient) 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 *cloudApiRegistryGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *cloudApiRegistryGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type cloudApiRegistryRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing CloudApiRegistryClient + CallOptions **CloudApiRegistryCallOptions + + logger *slog.Logger +} + +// NewCloudApiRegistryRESTClient creates a new cloud api registry rest client. +// +// The Cloud API Registry service provides a central registry for managing API +// Data. +func NewCloudApiRegistryRESTClient(ctx context.Context, opts ...option.ClientOption) (*CloudApiRegistryClient, error) { + clientOpts := append(defaultCloudApiRegistryRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultCloudApiRegistryRESTCallOptions() + c := &cloudApiRegistryRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + return &CloudApiRegistryClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultCloudApiRegistryRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://cloudapiregistry.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://cloudapiregistry.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://cloudapiregistry.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://cloudapiregistry.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// 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 *cloudApiRegistryRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *cloudApiRegistryRESTClient) 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 *cloudApiRegistryRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *cloudApiRegistryGRPCClient) GetMcpServer(ctx context.Context, req *apiregistrypb.GetMcpServerRequest, opts ...gax.CallOption) (*apiregistrypb.McpServer, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetMcpServer[0:len((*c.CallOptions).GetMcpServer):len((*c.CallOptions).GetMcpServer)], opts...) + var resp *apiregistrypb.McpServer + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.cloudApiRegistryClient.GetMcpServer, req, settings.GRPC, c.logger, "GetMcpServer") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *cloudApiRegistryGRPCClient) ListMcpServers(ctx context.Context, req *apiregistrypb.ListMcpServersRequest, opts ...gax.CallOption) *McpServerIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListMcpServers[0:len((*c.CallOptions).ListMcpServers):len((*c.CallOptions).ListMcpServers)], opts...) + it := &McpServerIterator{} + req = proto.Clone(req).(*apiregistrypb.ListMcpServersRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apiregistrypb.McpServer, string, error) { + resp := &apiregistrypb.ListMcpServersResponse{} + 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 = executeRPC(ctx, c.cloudApiRegistryClient.ListMcpServers, req, settings.GRPC, c.logger, "ListMcpServers") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetMcpServers(), 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 *cloudApiRegistryGRPCClient) GetMcpTool(ctx context.Context, req *apiregistrypb.GetMcpToolRequest, opts ...gax.CallOption) (*apiregistrypb.McpTool, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetMcpTool[0:len((*c.CallOptions).GetMcpTool):len((*c.CallOptions).GetMcpTool)], opts...) + var resp *apiregistrypb.McpTool + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.cloudApiRegistryClient.GetMcpTool, req, settings.GRPC, c.logger, "GetMcpTool") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *cloudApiRegistryGRPCClient) ListMcpTools(ctx context.Context, req *apiregistrypb.ListMcpToolsRequest, opts ...gax.CallOption) *McpToolIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListMcpTools[0:len((*c.CallOptions).ListMcpTools):len((*c.CallOptions).ListMcpTools)], opts...) + it := &McpToolIterator{} + req = proto.Clone(req).(*apiregistrypb.ListMcpToolsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apiregistrypb.McpTool, string, error) { + resp := &apiregistrypb.ListMcpToolsResponse{} + 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 = executeRPC(ctx, c.cloudApiRegistryClient.ListMcpTools, req, settings.GRPC, c.logger, "ListMcpTools") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetMcpTools(), 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 *cloudApiRegistryGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *cloudApiRegistryGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + 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 +} + +// GetMcpServer gets a single McpServer. +func (c *cloudApiRegistryRESTClient) GetMcpServer(ctx context.Context, req *apiregistrypb.GetMcpServerRequest, opts ...gax.CallOption) (*apiregistrypb.McpServer, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetMcpServer[0:len((*c.CallOptions).GetMcpServer):len((*c.CallOptions).GetMcpServer)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &apiregistrypb.McpServer{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMcpServer") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListMcpServers lists McpServers in a given Project. +func (c *cloudApiRegistryRESTClient) ListMcpServers(ctx context.Context, req *apiregistrypb.ListMcpServersRequest, opts ...gax.CallOption) *McpServerIterator { + it := &McpServerIterator{} + req = proto.Clone(req).(*apiregistrypb.ListMcpServersRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*apiregistrypb.McpServer, string, error) { + resp := &apiregistrypb.ListMcpServersResponse{} + 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("/v1beta/%v/mcpServers", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMcpServers") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMcpServers(), 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 +} + +// GetMcpTool gets a single McpTool. +func (c *cloudApiRegistryRESTClient) GetMcpTool(ctx context.Context, req *apiregistrypb.GetMcpToolRequest, opts ...gax.CallOption) (*apiregistrypb.McpTool, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetMcpTool[0:len((*c.CallOptions).GetMcpTool):len((*c.CallOptions).GetMcpTool)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &apiregistrypb.McpTool{} + 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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetMcpTool") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListMcpTools lists McpTools in a given McpServer. +func (c *cloudApiRegistryRESTClient) ListMcpTools(ctx context.Context, req *apiregistrypb.ListMcpToolsRequest, opts ...gax.CallOption) *McpToolIterator { + it := &McpToolIterator{} + req = proto.Clone(req).(*apiregistrypb.ListMcpToolsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*apiregistrypb.McpTool, string, error) { + resp := &apiregistrypb.ListMcpToolsResponse{} + 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("/v1beta/%v/mcpTools", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListMcpTools") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMcpTools(), 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 +} + +// GetLocation gets information about a location. +func (c *cloudApiRegistryRESTClient) 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("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).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 + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *cloudApiRegistryRESTClient) 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("/v1beta/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/apiregistry/apiv1beta/cloud_api_registry_client_example_go123_test.go b/apiregistry/apiv1beta/cloud_api_registry_client_example_go123_test.go new file mode 100644 index 000000000000..83df7c89a24b --- /dev/null +++ b/apiregistry/apiv1beta/cloud_api_registry_client_example_go123_test.go @@ -0,0 +1,105 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. + +//go:build go1.23 + +package apiregistry_test + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleCloudApiRegistryClient_ListMcpServers_all() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpServersRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpServersRequest. + } + for resp, err := range c.ListMcpServers(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleCloudApiRegistryClient_ListMcpTools_all() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpToolsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpToolsRequest. + } + for resp, err := range c.ListMcpTools(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleCloudApiRegistryClient_ListLocations_all() { + 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 := apiregistry.NewCloudApiRegistryClient(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. + } + for resp, err := range c.ListLocations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/apiregistry/apiv1beta/cloud_api_registry_client_example_test.go b/apiregistry/apiv1beta/cloud_api_registry_client_example_test.go new file mode 100644 index 000000000000..1077a77b35ee --- /dev/null +++ b/apiregistry/apiv1beta/cloud_api_registry_client_example_test.go @@ -0,0 +1,246 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 apiregistry_test + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewCloudApiRegistryClient() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewCloudApiRegistryRESTClient() { + 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 := apiregistry.NewCloudApiRegistryRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleCloudApiRegistryClient_GetMcpServer() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.GetMcpServerRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#GetMcpServerRequest. + } + resp, err := c.GetMcpServer(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleCloudApiRegistryClient_GetMcpTool() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.GetMcpToolRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#GetMcpToolRequest. + } + resp, err := c.GetMcpTool(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleCloudApiRegistryClient_ListMcpServers() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpServersRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpServersRequest. + } + it := c.ListMcpServers(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apiregistrypb.ListMcpServersResponse) + } +} + +func ExampleCloudApiRegistryClient_ListMcpTools() { + 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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpToolsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpToolsRequest. + } + it := c.ListMcpTools(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apiregistrypb.ListMcpToolsResponse) + } +} + +func ExampleCloudApiRegistryClient_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 := apiregistry.NewCloudApiRegistryClient(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 ExampleCloudApiRegistryClient_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 := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} diff --git a/apiregistry/apiv1beta/doc.go b/apiregistry/apiv1beta/doc.go new file mode 100644 index 000000000000..c90b6fcc7467 --- /dev/null +++ b/apiregistry/apiv1beta/doc.go @@ -0,0 +1,83 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 apiregistry is an auto-generated package for the +// Cloud API Registry API. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # General documentation +// +// For information that is relevant for all client libraries please reference +// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this +// page includes: +// +// - [Authentication and Authorization] +// - [Timeouts and Cancellation] +// - [Testing against Client Libraries] +// - [Debugging Client Libraries] +// - [Inspecting errors] +// +// # Example usage +// +// To get started with this package, create a client. +// +// // go get cloud.google.com/go/apiregistry/apiv1beta@latest +// 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 := apiregistry.NewCloudApiRegistryClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client, mentioned above. +// +// req := &apiregistrypb.GetMcpServerRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#GetMcpServerRequest. +// } +// resp, err := c.GetMcpServer(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewCloudApiRegistryClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization +// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation +// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing +// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging +// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors +package apiregistry // import "cloud.google.com/go/apiregistry/apiv1beta" diff --git a/apiregistry/apiv1beta/gapic_metadata.json b/apiregistry/apiv1beta/gapic_metadata.json new file mode 100644 index 000000000000..5fcc44a6d8f6 --- /dev/null +++ b/apiregistry/apiv1beta/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.apiregistry.v1beta", + "libraryPackage": "cloud.google.com/go/apiregistry/apiv1beta", + "services": { + "CloudApiRegistry": { + "clients": { + "grpc": { + "libraryClient": "CloudApiRegistryClient", + "rpcs": { + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetMcpServer": { + "methods": [ + "GetMcpServer" + ] + }, + "GetMcpTool": { + "methods": [ + "GetMcpTool" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMcpServers": { + "methods": [ + "ListMcpServers" + ] + }, + "ListMcpTools": { + "methods": [ + "ListMcpTools" + ] + } + } + }, + "rest": { + "libraryClient": "CloudApiRegistryClient", + "rpcs": { + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetMcpServer": { + "methods": [ + "GetMcpServer" + ] + }, + "GetMcpTool": { + "methods": [ + "GetMcpTool" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListMcpServers": { + "methods": [ + "ListMcpServers" + ] + }, + "ListMcpTools": { + "methods": [ + "ListMcpTools" + ] + } + } + } + } + } + } +} diff --git a/apiregistry/apiv1beta/helpers.go b/apiregistry/apiv1beta/helpers.go new file mode 100644 index 000000000000..f72130fb358d --- /dev/null +++ b/apiregistry/apiv1beta/helpers.go @@ -0,0 +1,105 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 apiregistry + +import ( + "context" + "fmt" + "io" + "log/slog" + "net/http" + + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" + "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" +) + +const serviceName = "cloudapiregistry.googleapis.com" + +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) + if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/apiregistry/apiv1beta/version.go b/apiregistry/apiv1beta/version.go new file mode 100644 index 000000000000..a9ab72eb94d9 --- /dev/null +++ b/apiregistry/apiv1beta/version.go @@ -0,0 +1,23 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package apiregistry + +import "cloud.google.com/go/apiregistry/internal" + +func init() { + versionClient = internal.Version +} diff --git a/apiregistry/go.mod b/apiregistry/go.mod new file mode 100644 index 000000000000..767def4d5163 --- /dev/null +++ b/apiregistry/go.mod @@ -0,0 +1,37 @@ +module cloud.google.com/go/apiregistry + +go 1.24.0 + +require ( + github.com/googleapis/gax-go/v2 v2.16.0 + google.golang.org/api v0.258.0 + google.golang.org/genproto v0.0.0-20251222181119-0a764e51fe1b + google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b + google.golang.org/grpc v1.78.0 + google.golang.org/protobuf v1.36.11 +) + +require ( + cloud.google.com/go/auth v0.17.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/time v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 // indirect +) diff --git a/apiregistry/go.sum b/apiregistry/go.sum new file mode 100644 index 000000000000..98d36ade7514 --- /dev/null +++ b/apiregistry/go.sum @@ -0,0 +1,86 @@ +cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4= +cloud.google.com/go/auth v0.17.0/go.mod h1:6wv/t5/6rOPAX4fJiRjKkJCvswLwdet7G8+UGXt7nCQ= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f h1:Y8xYupdHxryycyPlc9Y+bSQAYZnetRJ70VMVKm5CKI0= +github.com/cncf/xds/go v0.0.0-20251022180443-0feb69152e9f/go.mod h1:HlzOvOjVBOfTGSRXRyY0OiCS/3J1akRGQQpRO/7zyF4= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.13.5-0.20251024222203-75eaa193e329 h1:K+fnvUM0VZ7ZFJf0n4L/BRlnsb9pL/GuDG6FqaH+PwM= +github.com/envoyproxy/go-control-plane/envoy v1.35.0 h1:ixjkELDE+ru6idPxcHLj8LBVc2bFP7iBytj353BoHUo= +github.com/envoyproxy/go-control-plane/envoy v1.35.0/go.mod h1:09qwbGVuSWWAyN5t/b3iyVfz5+z8QWGrzkoqm/8SbEs= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.7 h1:zrn2Ee/nWmHulBx5sAVrGgAa0f2/R35S4DJwfFaUPFQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.7/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.16.0 h1:iHbQmKLLZrexmb0OSsNGTeSTS0HO4YvFOG8g5E4Zd0Y= +github.com/googleapis/gax-go/v2 v2.16.0/go.mod h1:o1vfQjjNZn4+dPnRdl/4ZD7S9414Y4xA+a/6Icj6l14= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/api v0.258.0 h1:IKo1j5FBlN74fe5isA2PVozN3Y5pwNKriEgAXPOkDAc= +google.golang.org/api v0.258.0/go.mod h1:qhOMTQEZ6lUps63ZNq9jhODswwjkjYYguA7fA3TBFww= +google.golang.org/genproto v0.0.0-20251222181119-0a764e51fe1b h1:kqShdsddZrS6q+DGBCA73CzHsKDu5vW4qw78tFnbVvY= +google.golang.org/genproto v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:gw1DtiPCt5uh/HV9STVEeaO00S5ATsJiJ2LsZV8lcDI= +google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b h1:uA40e2M6fYRBf0+8uN5mLlqUtV192iiksiICIBkYJ1E= +google.golang.org/genproto/googleapis/api v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:Xa7le7qx2vmqB/SzWUBa7KdMjpdpAHlh5QCSnjessQk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 h1:2I6GHUeJ/4shcDpoUlLs/2WPnhg7yJwvXtqcMJt9liA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/apiregistry/internal/version.go b/apiregistry/internal/version.go new file mode 100644 index 000000000000..04ec61c29392 --- /dev/null +++ b/apiregistry/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.0.0" diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetLocation/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetLocation/main.go new file mode 100644 index 000000000000..f43df00e7888 --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetLocation_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetLocation_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpServer/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpServer/main.go new file mode 100644 index 000000000000..caa9508a7aa0 --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpServer/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.GetMcpServerRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#GetMcpServerRequest. + } + resp, err := c.GetMcpServer(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpTool/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpTool/main.go new file mode 100644 index 000000000000..42819ed0856f --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/GetMcpTool/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.GetMcpToolRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#GetMcpToolRequest. + } + resp, err := c.GetMcpTool(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListLocations/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListLocations/main.go new file mode 100644 index 000000000000..c226e9d4923a --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListLocations_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListLocations_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpServers/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpServers/main.go new file mode 100644 index 000000000000..44a6f2f2706d --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpServers/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpServersRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpServersRequest. + } + it := c.ListMcpServers(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apiregistrypb.ListMcpServersResponse) + } +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpTools/main.go b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpTools/main.go new file mode 100644 index 000000000000..d16f9ecfda10 --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/CloudApiRegistryClient/ListMcpTools/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync] + +package main + +import ( + "context" + + apiregistry "cloud.google.com/go/apiregistry/apiv1beta" + apiregistrypb "cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := apiregistry.NewCloudApiRegistryClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apiregistrypb.ListMcpToolsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/apiregistry/apiv1beta/apiregistrypb#ListMcpToolsRequest. + } + it := c.ListMcpTools(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apiregistrypb.ListMcpToolsResponse) + } +} + +// [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync] diff --git a/internal/generated/snippets/apiregistry/apiv1beta/snippet_metadata.google.cloud.apiregistry.v1beta.json b/internal/generated/snippets/apiregistry/apiv1beta/snippet_metadata.google.cloud.apiregistry.v1beta.json new file mode 100644 index 000000000000..38250c61eee7 --- /dev/null +++ b/internal/generated/snippets/apiregistry/apiv1beta/snippet_metadata.google.cloud.apiregistry.v1beta.json @@ -0,0 +1,291 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/apiregistry/apiv1beta", + "version": "0.0.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.apiregistry.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetLocation_sync", + "title": "cloudapiregistry GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "CloudApiRegistryClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync", + "title": "cloudapiregistry GetMcpServer Sample", + "description": "GetMcpServer gets a single McpServer.", + "file": "CloudApiRegistryClient/GetMcpServer/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetMcpServer", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.GetMcpServer", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apiregistrypb.GetMcpServerRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*apiregistrypb.McpServer", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "GetMcpServer", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpServer", + "service": { + "shortName": "CloudApiRegistry", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync", + "title": "cloudapiregistry GetMcpTool Sample", + "description": "GetMcpTool gets a single McpTool.", + "file": "CloudApiRegistryClient/GetMcpTool/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetMcpTool", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.GetMcpTool", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apiregistrypb.GetMcpToolRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*apiregistrypb.McpTool", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "GetMcpTool", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry.GetMcpTool", + "service": { + "shortName": "CloudApiRegistry", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListLocations_sync", + "title": "cloudapiregistry ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "CloudApiRegistryClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync", + "title": "cloudapiregistry ListMcpServers Sample", + "description": "ListMcpServers lists McpServers in a given Project.", + "file": "CloudApiRegistryClient/ListMcpServers/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListMcpServers", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.ListMcpServers", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apiregistrypb.ListMcpServersRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "McpServerIterator", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "ListMcpServers", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpServers", + "service": { + "shortName": "CloudApiRegistry", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync", + "title": "cloudapiregistry ListMcpTools Sample", + "description": "ListMcpTools lists McpTools in a given McpServer.", + "file": "CloudApiRegistryClient/ListMcpTools/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListMcpTools", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient.ListMcpTools", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apiregistrypb.ListMcpToolsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "McpToolIterator", + "client": { + "shortName": "CloudApiRegistryClient", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistryClient" + }, + "method": { + "shortName": "ListMcpTools", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry.ListMcpTools", + "service": { + "shortName": "CloudApiRegistry", + "fullName": "google.cloud.apiregistry.v1beta.CloudApiRegistry" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 8e566bf0a950..349479e4173e 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -578,3 +578,5 @@ replace cloud.google.com/go/saasplatform => ../../../saasplatform replace cloud.google.com/go/vectorsearch => ../../../vectorsearch replace cloud.google.com/go/hypercomputecluster => ../../../hypercomputecluster + +replace cloud.google.com/go/apiregistry => ../../../apiregistry