diff --git a/.github/renovate.json b/.github/renovate.json index 9a9c3f7cda91..27f70a364f15 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -32,6 +32,7 @@ "apis/Google.Cloud.AIPlatform.V1/Google.Cloud.AIPlatform.V1/**", "apis/Google.Cloud.ApiHub.V1/Google.Cloud.ApiHub.V1/**", "apis/Google.Cloud.ApiKeys.V2/Google.Cloud.ApiKeys.V2/**", + "apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/**", "apis/Google.Cloud.ApigeeConnect.V1/Google.Cloud.ApigeeConnect.V1/**", "apis/Google.Cloud.ApigeeRegistry.V1/Google.Cloud.ApigeeRegistry.V1/**", "apis/Google.Cloud.AppEngine.Logging.V1/Google.Cloud.AppEngine.Logging.V1/**", diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/.repo-metadata.json b/apis/Google.Cloud.ApiRegistry.V1Beta/.repo-metadata.json new file mode 100644 index 000000000000..35474409d3d6 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "distribution_name": "Google.Cloud.ApiRegistry.V1Beta", + "release_level": "unreleased", + "client_documentation": "https://cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiRegistry.V1Beta/latest", + "library_type": "GAPIC_AUTO", + "language": "dotnet", + "api_shortname": "cloudapiregistry" +} \ No newline at end of file diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerAsyncSnippet.g.cs new file mode 100644 index 000000000000..c687c70ad0aa --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServerAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpServerAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..3df888469274 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServerAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpServerRequestObjectAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + GetMcpServerRequest request = new GetMcpServerRequest + { + McpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + }; + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(request); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..c5deb337ef63 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServer + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpServerRequestObject() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + GetMcpServerRequest request = new GetMcpServerRequest + { + McpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + }; + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(request); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..f773945b30da --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened_resourceNames] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServerAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpServerResourceNamesAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpServerName name = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..d015f25e1d95 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened_resourceNames] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServer + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpServerResourceNames() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpServerName name = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerSnippet.g.cs new file mode 100644 index 000000000000..b3bd26de7749 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpServerSnippet.g.cs @@ -0,0 +1,43 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServer + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpServer() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolAsyncSnippet.g.cs new file mode 100644 index 000000000000..db7233347b03 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpToolAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpToolAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]/mcpTools/[MCP_TOOL]"; + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..37b7e6c44fb7 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,47 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpToolAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpToolRequestObjectAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + GetMcpToolRequest request = new GetMcpToolRequest + { + McpToolName = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"), + }; + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(request); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..6df650e4fb31 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolRequestObjectSnippet.g.cs @@ -0,0 +1,46 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpTool + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpToolRequestObject() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + GetMcpToolRequest request = new GetMcpToolRequest + { + McpToolName = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"), + }; + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(request); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..248c215ba4d3 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened_resourceNames] + using Google.Cloud.ApiRegistry.V1Beta; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpToolAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task GetMcpToolResourceNamesAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpToolName name = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"); + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..f93174931219 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolResourceNamesSnippet.g.cs @@ -0,0 +1,43 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened_resourceNames] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpTool + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpToolResourceNames() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpToolName name = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"); + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolSnippet.g.cs new file mode 100644 index 000000000000..44188e21bec3 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.GetMcpToolSnippet.g.cs @@ -0,0 +1,43 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened] + using Google.Cloud.ApiRegistry.V1Beta; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpTool + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void GetMcpTool() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]/mcpTools/[MCP_TOOL]"; + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(name); + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersAsyncSnippet.g.cs new file mode 100644 index 000000000000..6f236b7d97b2 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServersAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpServersAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..9622e5b59e04 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,85 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServersAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpServersRequestObjectAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..3c7cdf0b9051 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersRequestObjectSnippet.g.cs @@ -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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServers + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpServersRequestObject() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..b17910307dfc --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,80 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServersAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpServersResourceNamesAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..137f95685b02 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersResourceNamesSnippet.g.cs @@ -0,0 +1,78 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServers + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpServersResourceNames() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersSnippet.g.cs new file mode 100644 index 000000000000..0a9c0c76d0eb --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpServersSnippet.g.cs @@ -0,0 +1,77 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpServers + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpServers() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsAsyncSnippet.g.cs new file mode 100644 index 000000000000..fc9496b64a78 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpToolsAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpToolsAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectAsyncSnippet.g.cs new file mode 100644 index 000000000000..a37a96aa1351 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,84 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpToolsAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpToolsRequestObjectAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectSnippet.g.cs new file mode 100644 index 000000000000..4a805371163c --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsRequestObjectSnippet.g.cs @@ -0,0 +1,82 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpTools + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpToolsRequestObject() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesAsyncSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesAsyncSnippet.g.cs new file mode 100644 index 000000000000..c46ecd7081a4 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesAsyncSnippet.g.cs @@ -0,0 +1,79 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpToolsAsync + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListMcpToolsResourceNamesAsync() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpServerName parent = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesSnippet.g.cs new file mode 100644 index 000000000000..c42e1f83fb05 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsResourceNamesSnippet.g.cs @@ -0,0 +1,77 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened_resourceNames] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpTools + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpToolsResourceNames() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpServerName parent = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened_resourceNames] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsSnippet.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsSnippet.g.cs new file mode 100644 index 000000000000..8a3c32703ded --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/CloudApiRegistryClient.ListMcpToolsSnippet.g.cs @@ -0,0 +1,77 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + // [START cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened] + using Google.Api.Gax; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + + public sealed partial class GeneratedCloudApiRegistryClientSnippets + { + /// Snippet for ListMcpTools + /// + /// 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://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListMcpTools() + { + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + } + } + // [END cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets.csproj b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets.csproj new file mode 100644 index 000000000000..693f2913666d --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets.csproj @@ -0,0 +1,20 @@ + + + + net8.0;net462 + net8.0 + false + $(NoWarn);1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.apiregistry.v1beta.json b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.apiregistry.v1beta.json new file mode 100644 index 000000000000..da299011e4bb --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets/snippet_metadata_google.cloud.apiregistry.v1beta.json @@ -0,0 +1,1226 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.ApiRegistry.V1Beta", + "language": "C_SHARP", + "apis": [ + { + "id": "google.cloud.apiregistry.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync", + "title": "GetMcpServerRequestObject", + "description": "Snippet for GetMcpServer", + "file": "CloudApiRegistryClient.GetMcpServerRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServer", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServer", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async", + "title": "GetMcpServerRequestObjectAsync", + "description": "Snippet for GetMcpServerAsync", + "file": "CloudApiRegistryClient.GetMcpServerRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServerAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServerAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened", + "title": "GetMcpServer", + "description": "Snippet for GetMcpServer", + "file": "CloudApiRegistryClient.GetMcpServerSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServer", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServer", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened", + "title": "GetMcpServerAsync", + "description": "Snippet for GetMcpServerAsync", + "file": "CloudApiRegistryClient.GetMcpServerAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServerAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServerAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_sync_flattened_resourceNames", + "title": "GetMcpServerResourceNames", + "description": "Snippet for GetMcpServer", + "file": "CloudApiRegistryClient.GetMcpServerResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServer", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServer", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpServerName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpServer_async_flattened_resourceNames", + "title": "GetMcpServerResourceNamesAsync", + "description": "Snippet for GetMcpServerAsync", + "file": "CloudApiRegistryClient.GetMcpServerResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpServerAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpServerAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpServerName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync", + "title": "ListMcpServersRequestObject", + "description": "Snippet for ListMcpServers", + "file": "CloudApiRegistryClient.ListMcpServersRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServers", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServers", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 81, + "type": "FULL" + }, + { + "start": 37, + "end": 79, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async", + "title": "ListMcpServersRequestObjectAsync", + "description": "Snippet for ListMcpServersAsync", + "file": "CloudApiRegistryClient.ListMcpServersRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServersAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServersAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 83, + "type": "FULL" + }, + { + "start": 39, + "end": 81, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened", + "title": "ListMcpServers", + "description": "Snippet for ListMcpServers", + "file": "CloudApiRegistryClient.ListMcpServersSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServers", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServers", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened", + "title": "ListMcpServersAsync", + "description": "Snippet for ListMcpServersAsync", + "file": "CloudApiRegistryClient.ListMcpServersAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServersAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServersAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_sync_flattened_resourceNames", + "title": "ListMcpServersResourceNames", + "description": "Snippet for ListMcpServers", + "file": "CloudApiRegistryClient.ListMcpServersResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServers", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServers", + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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": 20, + "end": 76, + "type": "FULL" + }, + { + "start": 37, + "end": 74, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpServers_async_flattened_resourceNames", + "title": "ListMcpServersResourceNamesAsync", + "description": "Snippet for ListMcpServersAsync", + "file": "CloudApiRegistryClient.ListMcpServersResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpServersAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpServersAsync", + "async": true, + "parameters": [ + { + "type": "Google.Api.Gax.ResourceNames.LocationName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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": 20, + "end": 78, + "type": "FULL" + }, + { + "start": 39, + "end": 76, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync", + "title": "GetMcpToolRequestObject", + "description": "Snippet for GetMcpTool", + "file": "CloudApiRegistryClient.GetMcpToolRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpTool", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpTool", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 34, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async", + "title": "GetMcpToolRequestObjectAsync", + "description": "Snippet for GetMcpToolAsync", + "file": "CloudApiRegistryClient.GetMcpToolRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpToolAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpToolAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 45, + "type": "FULL" + }, + { + "start": 35, + "end": 43, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened", + "title": "GetMcpTool", + "description": "Snippet for GetMcpTool", + "file": "CloudApiRegistryClient.GetMcpToolSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpTool", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpTool", + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened", + "title": "GetMcpToolAsync", + "description": "Snippet for GetMcpToolAsync", + "file": "CloudApiRegistryClient.GetMcpToolAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpToolAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpToolAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_sync_flattened_resourceNames", + "title": "GetMcpToolResourceNames", + "description": "Snippet for GetMcpTool", + "file": "CloudApiRegistryClient.GetMcpToolResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpTool", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpTool", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpToolName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.ApiRegistry.V1Beta.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": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_GetMcpTool_async_flattened_resourceNames", + "title": "GetMcpToolResourceNamesAsync", + "description": "Snippet for GetMcpToolAsync", + "file": "CloudApiRegistryClient.GetMcpToolResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "GetMcpToolAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.GetMcpToolAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpToolName", + "name": "name" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "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": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync", + "title": "ListMcpToolsRequestObject", + "description": "Snippet for ListMcpTools", + "file": "CloudApiRegistryClient.ListMcpToolsRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpTools", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpTools", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 80, + "type": "FULL" + }, + { + "start": 36, + "end": 78, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async", + "title": "ListMcpToolsRequestObjectAsync", + "description": "Snippet for ListMcpToolsAsync", + "file": "CloudApiRegistryClient.ListMcpToolsRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpToolsAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpToolsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 82, + "type": "FULL" + }, + { + "start": 38, + "end": 80, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened", + "title": "ListMcpTools", + "description": "Snippet for ListMcpTools", + "file": "CloudApiRegistryClient.ListMcpToolsSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpTools", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpTools", + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened", + "title": "ListMcpToolsAsync", + "description": "Snippet for ListMcpToolsAsync", + "file": "CloudApiRegistryClient.ListMcpToolsAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpToolsAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpToolsAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_sync_flattened_resourceNames", + "title": "ListMcpToolsResourceNames", + "description": "Snippet for ListMcpTools", + "file": "CloudApiRegistryClient.ListMcpToolsResourceNamesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpTools", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpTools", + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpServerName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedEnumerable", + "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": 20, + "end": 75, + "type": "FULL" + }, + { + "start": 36, + "end": 73, + "type": "SHORT" + } + ] + }, + { + "regionTag": "cloudapiregistry_v1beta_generated_CloudApiRegistry_ListMcpTools_async_flattened_resourceNames", + "title": "ListMcpToolsResourceNamesAsync", + "description": "Snippet for ListMcpToolsAsync", + "file": "CloudApiRegistryClient.ListMcpToolsResourceNamesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListMcpToolsAsync", + "fullName": "Google.Cloud.ApiRegistry.V1Beta.CloudApiRegistryClient.ListMcpToolsAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.ApiRegistry.V1Beta.McpServerName", + "name": "parent" + }, + { + "type": "System.String", + "name": "pageToken" + }, + { + "type": "System.Nullable[System.Int32]", + "name": "pageSize" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Api.Gax.PagedAsyncEnumerable", + "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": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 38, + "end": 75, + "type": "SHORT" + } + ] + } + ] +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/CloudApiRegistryClientSnippets.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/CloudApiRegistryClientSnippets.g.cs new file mode 100644 index 000000000000..1f09f1d36b5d --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/CloudApiRegistryClientSnippets.g.cs @@ -0,0 +1,763 @@ +// 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. + +// Generated code. DO NOT EDIT! + +namespace GoogleCSharpSnippets +{ + using Google.Api.Gax; + using Google.Api.Gax.ResourceNames; + using Google.Cloud.ApiRegistry.V1Beta; + using System; + using System.Linq; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedCloudApiRegistryClientSnippets + { + /// Snippet for GetMcpServer + public void GetMcpServerRequestObject() + { + // Snippet: GetMcpServer(GetMcpServerRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + GetMcpServerRequest request = new GetMcpServerRequest + { + McpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + }; + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(request); + // End snippet + } + + /// Snippet for GetMcpServerAsync + public async Task GetMcpServerRequestObjectAsync() + { + // Snippet: GetMcpServerAsync(GetMcpServerRequest, CallSettings) + // Additional: GetMcpServerAsync(GetMcpServerRequest, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + GetMcpServerRequest request = new GetMcpServerRequest + { + McpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + }; + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(request); + // End snippet + } + + /// Snippet for GetMcpServer + public void GetMcpServer() + { + // Snippet: GetMcpServer(string, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(name); + // End snippet + } + + /// Snippet for GetMcpServerAsync + public async Task GetMcpServerAsync() + { + // Snippet: GetMcpServerAsync(string, CallSettings) + // Additional: GetMcpServerAsync(string, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(name); + // End snippet + } + + /// Snippet for GetMcpServer + public void GetMcpServerResourceNames() + { + // Snippet: GetMcpServer(McpServerName, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpServerName name = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + McpServer response = cloudApiRegistryClient.GetMcpServer(name); + // End snippet + } + + /// Snippet for GetMcpServerAsync + public async Task GetMcpServerResourceNamesAsync() + { + // Snippet: GetMcpServerAsync(McpServerName, CallSettings) + // Additional: GetMcpServerAsync(McpServerName, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpServerName name = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + McpServer response = await cloudApiRegistryClient.GetMcpServerAsync(name); + // End snippet + } + + /// Snippet for ListMcpServers + public void ListMcpServersRequestObject() + { + // Snippet: ListMcpServers(ListMcpServersRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpServersAsync + public async Task ListMcpServersRequestObjectAsync() + { + // Snippet: ListMcpServersAsync(ListMcpServersRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpServers + public void ListMcpServers() + { + // Snippet: ListMcpServers(string, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpServersAsync + public async Task ListMcpServersAsync() + { + // Snippet: ListMcpServersAsync(string, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]"; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpServers + public void ListMcpServersResourceNames() + { + // Snippet: ListMcpServers(LocationName, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpServers(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpServer item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpServersResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpServersAsync + public async Task ListMcpServersResourceNamesAsync() + { + // Snippet: ListMcpServersAsync(LocationName, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpServersAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpServer item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpServersResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpServer item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpServer item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for GetMcpTool + public void GetMcpToolRequestObject() + { + // Snippet: GetMcpTool(GetMcpToolRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + GetMcpToolRequest request = new GetMcpToolRequest + { + McpToolName = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"), + }; + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(request); + // End snippet + } + + /// Snippet for GetMcpToolAsync + public async Task GetMcpToolRequestObjectAsync() + { + // Snippet: GetMcpToolAsync(GetMcpToolRequest, CallSettings) + // Additional: GetMcpToolAsync(GetMcpToolRequest, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + GetMcpToolRequest request = new GetMcpToolRequest + { + McpToolName = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"), + }; + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(request); + // End snippet + } + + /// Snippet for GetMcpTool + public void GetMcpTool() + { + // Snippet: GetMcpTool(string, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]/mcpTools/[MCP_TOOL]"; + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(name); + // End snippet + } + + /// Snippet for GetMcpToolAsync + public async Task GetMcpToolAsync() + { + // Snippet: GetMcpToolAsync(string, CallSettings) + // Additional: GetMcpToolAsync(string, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string name = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]/mcpTools/[MCP_TOOL]"; + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(name); + // End snippet + } + + /// Snippet for GetMcpTool + public void GetMcpToolResourceNames() + { + // Snippet: GetMcpTool(McpToolName, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpToolName name = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"); + // Make the request + McpTool response = cloudApiRegistryClient.GetMcpTool(name); + // End snippet + } + + /// Snippet for GetMcpToolAsync + public async Task GetMcpToolResourceNamesAsync() + { + // Snippet: GetMcpToolAsync(McpToolName, CallSettings) + // Additional: GetMcpToolAsync(McpToolName, CancellationToken) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpToolName name = McpToolName.FromProjectLocationApiNamespaceMcpServerMcpTool("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]", "[MCP_TOOL]"); + // Make the request + McpTool response = await cloudApiRegistryClient.GetMcpToolAsync(name); + // End snippet + } + + /// Snippet for ListMcpTools + public void ListMcpToolsRequestObject() + { + // Snippet: ListMcpTools(ListMcpToolsRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(request); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpToolsAsync + public async Task ListMcpToolsRequestObjectAsync() + { + // Snippet: ListMcpToolsAsync(ListMcpToolsRequest, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"), + Filter = "", + OrderBy = "", + }; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(request); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpTools + public void ListMcpTools() + { + // Snippet: ListMcpTools(string, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpToolsAsync + public async Task ListMcpToolsAsync() + { + // Snippet: ListMcpToolsAsync(string, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + string parent = "projects/[PROJECT]/locations/[LOCATION]/apiNamespaces/[API_NAMESPACE]/mcpServers/[MCP_SERVER]"; + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpTools + public void ListMcpToolsResourceNames() + { + // Snippet: ListMcpTools(McpServerName, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = CloudApiRegistryClient.Create(); + // Initialize request argument(s) + McpServerName parent = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + PagedEnumerable response = cloudApiRegistryClient.ListMcpTools(parent); + + // Iterate over all response items, lazily performing RPCs as required + foreach (McpTool item in response) + { + // Do something with each item + Console.WriteLine(item); + } + + // Or iterate over pages (of server-defined size), performing one RPC per page + foreach (ListMcpToolsResponse page in response.AsRawResponses()) + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + } + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = response.ReadPage(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + + /// Snippet for ListMcpToolsAsync + public async Task ListMcpToolsResourceNamesAsync() + { + // Snippet: ListMcpToolsAsync(McpServerName, string, int?, CallSettings) + // Create client + CloudApiRegistryClient cloudApiRegistryClient = await CloudApiRegistryClient.CreateAsync(); + // Initialize request argument(s) + McpServerName parent = McpServerName.FromProjectLocationApiNamespaceMcpServer("[PROJECT]", "[LOCATION]", "[API_NAMESPACE]", "[MCP_SERVER]"); + // Make the request + PagedAsyncEnumerable response = cloudApiRegistryClient.ListMcpToolsAsync(parent); + + // Iterate over all response items, lazily performing RPCs as required + await response.ForEachAsync((McpTool item) => + { + // Do something with each item + Console.WriteLine(item); + }); + + // Or iterate over pages (of server-defined size), performing one RPC per page + await response.AsRawResponses().ForEachAsync((ListMcpToolsResponse page) => + { + // Do something with each page of items + Console.WriteLine("A page of results:"); + foreach (McpTool item in page) + { + // Do something with each item + Console.WriteLine(item); + } + }); + + // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required + int pageSize = 10; + Page singlePage = await response.ReadPageAsync(pageSize); + // Do something with the page of items + Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); + foreach (McpTool item in singlePage) + { + // Do something with each item + Console.WriteLine(item); + } + // Store the pageToken, for when the next page is required. + string nextPageToken = singlePage.NextPageToken; + // End snippet + } + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/Google.Cloud.ApiRegistry.V1Beta.Snippets.csproj b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/Google.Cloud.ApiRegistry.V1Beta.Snippets.csproj new file mode 100644 index 000000000000..693f2913666d --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.Snippets/Google.Cloud.ApiRegistry.V1Beta.Snippets.csproj @@ -0,0 +1,20 @@ + + + + net8.0;net462 + net8.0 + false + $(NoWarn);1701;1702;1705;xUnit2004;xUnit2013 + + + + + + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.sln b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.sln new file mode 100644 index 000000000000..2b1bc2b946a3 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32516.85 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ApiRegistry.V1Beta", "Google.Cloud.ApiRegistry.V1Beta\Google.Cloud.ApiRegistry.V1Beta.csproj", "{9FF2D360-A4E1-A182-2DEA-516B5ED0B7CC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ApiRegistry.V1Beta.Snippets", "Google.Cloud.ApiRegistry.V1Beta.Snippets\Google.Cloud.ApiRegistry.V1Beta.Snippets.csproj", "{D727411B-ADB7-4071-E083-C168D832FFE5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets", "Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets\Google.Cloud.ApiRegistry.V1Beta.GeneratedSnippets.csproj", "{F2C77561-D686-25E8-6FEC-8681D9BCC2D6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Cloud.ClientTesting", "..\..\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj", "{29974B0C-A7B0-8CA8-AE32-99F622C89044}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FF2D360-A4E1-A182-2DEA-516B5ED0B7CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FF2D360-A4E1-A182-2DEA-516B5ED0B7CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FF2D360-A4E1-A182-2DEA-516B5ED0B7CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FF2D360-A4E1-A182-2DEA-516B5ED0B7CC}.Release|Any CPU.Build.0 = Release|Any CPU + {D727411B-ADB7-4071-E083-C168D832FFE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D727411B-ADB7-4071-E083-C168D832FFE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D727411B-ADB7-4071-E083-C168D832FFE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D727411B-ADB7-4071-E083-C168D832FFE5}.Release|Any CPU.Build.0 = Release|Any CPU + {F2C77561-D686-25E8-6FEC-8681D9BCC2D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2C77561-D686-25E8-6FEC-8681D9BCC2D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2C77561-D686-25E8-6FEC-8681D9BCC2D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2C77561-D686-25E8-6FEC-8681D9BCC2D6}.Release|Any CPU.Build.0 = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29974B0C-A7B0-8CA8-AE32-99F622C89044}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/CloudApiRegistryClient.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/CloudApiRegistryClient.g.cs new file mode 100644 index 000000000000..70cd8e213c89 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/CloudApiRegistryClient.g.cs @@ -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. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using sc = System.Collections; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; + +namespace Google.Cloud.ApiRegistry.V1Beta +{ + /// Settings for instances. + public sealed partial class CloudApiRegistrySettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static CloudApiRegistrySettings GetDefault() => new CloudApiRegistrySettings(); + + /// Constructs a new object with default settings. + public CloudApiRegistrySettings() + { + } + + private CloudApiRegistrySettings(CloudApiRegistrySettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + GetMcpServerSettings = existing.GetMcpServerSettings; + ListMcpServersSettings = existing.ListMcpServersSettings; + GetMcpToolSettings = existing.GetMcpToolSettings; + ListMcpToolsSettings = existing.ListMcpToolsSettings; + LocationsSettings = existing.LocationsSettings; + OnCopy(existing); + } + + partial void OnCopy(CloudApiRegistrySettings existing); + + /// + /// for synchronous and asynchronous calls to + /// CloudApiRegistryClient.GetMcpServer and CloudApiRegistryClient.GetMcpServerAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetMcpServerSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// CloudApiRegistryClient.ListMcpServers and CloudApiRegistryClient.ListMcpServersAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListMcpServersSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// CloudApiRegistryClient.GetMcpTool and CloudApiRegistryClient.GetMcpToolAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings GetMcpToolSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// for synchronous and asynchronous calls to + /// CloudApiRegistryClient.ListMcpTools and CloudApiRegistryClient.ListMcpToolsAsync. + /// + /// + /// + /// Initial retry delay: 1000 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 10000 milliseconds. + /// Maximum attempts: 5 + /// + /// Retriable status codes: . + /// + /// Timeout: 60 seconds. + /// + /// + public gaxgrpc::CallSettings ListMcpToolsSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(60000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 5, initialBackoff: sys::TimeSpan.FromMilliseconds(1000), maxBackoff: sys::TimeSpan.FromMilliseconds(10000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable))); + + /// + /// The settings to use for the associated with the client. + /// + public gcl::LocationsSettings LocationsSettings { get; set; } = gcl::LocationsSettings.GetDefault(); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public CloudApiRegistrySettings Clone() => new CloudApiRegistrySettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint + /// etc. + /// + public sealed partial class CloudApiRegistryClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public CloudApiRegistrySettings Settings { get; set; } + + /// Creates a new builder with default settings. + public CloudApiRegistryClientBuilder() : base(CloudApiRegistryClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref CloudApiRegistryClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override CloudApiRegistryClient Build() + { + CloudApiRegistryClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private CloudApiRegistryClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return CloudApiRegistryClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return CloudApiRegistryClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => CloudApiRegistryClient.ChannelPool; + } + + /// CloudApiRegistry client wrapper, for convenient use. + /// + /// The Cloud API Registry service provides a central registry for managing API + /// Data. + /// + public abstract partial class CloudApiRegistryClient + { + /// + /// The default endpoint for the CloudApiRegistry service, which is a host of "cloudapiregistry.googleapis.com" + /// and a port of 443. + /// + public static string DefaultEndpoint { get; } = "cloudapiregistry.googleapis.com:443"; + + /// The default CloudApiRegistry scopes. + /// + /// The default CloudApiRegistry scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(CloudApiRegistry.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new CloudApiRegistryClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static CloudApiRegistryClient Create() => new CloudApiRegistryClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static CloudApiRegistryClient Create(grpccore::CallInvoker callInvoker, CloudApiRegistrySettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + CloudApiRegistry.CloudApiRegistryClient grpcClient = new CloudApiRegistry.CloudApiRegistryClient(callInvoker); + return new CloudApiRegistryClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC CloudApiRegistry client + public virtual CloudApiRegistry.CloudApiRegistryClient GrpcClient => throw new sys::NotImplementedException(); + + /// The associated with this client. + public virtual gcl::LocationsClient LocationsClient => throw new sys::NotImplementedException(); + + /// + /// Gets a single McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpServer GetMcpServer(GetMcpServerRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a single McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(GetMcpServerRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a single McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(GetMcpServerRequest request, st::CancellationToken cancellationToken) => + GetMcpServerAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpServer GetMcpServer(string name, gaxgrpc::CallSettings callSettings = null) => + GetMcpServer(new GetMcpServerRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetMcpServerAsync(new GetMcpServerRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(string name, st::CancellationToken cancellationToken) => + GetMcpServerAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpServer GetMcpServer(McpServerName name, gaxgrpc::CallSettings callSettings = null) => + GetMcpServer(new GetMcpServerRequest + { + McpServerName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(McpServerName name, gaxgrpc::CallSettings callSettings = null) => + GetMcpServerAsync(new GetMcpServerRequest + { + McpServerName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpServer. + /// + /// + /// Required. Name of the resource + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpServerAsync(McpServerName name, st::CancellationToken cancellationToken) => + GetMcpServerAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Lists McpServers in a given Project. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpServers(ListMcpServersRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists McpServers in a given Project. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpServersAsync(ListMcpServersRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists McpServers in a given Project. + /// + /// + /// Required. Parent value for ListMcpServersRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpServers(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpServersRequest request = new ListMcpServersRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpServers(request, callSettings); + } + + /// + /// Lists McpServers in a given Project. + /// + /// + /// Required. Parent value for ListMcpServersRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpServersAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpServersRequest request = new ListMcpServersRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpServersAsync(request, callSettings); + } + + /// + /// Lists McpServers in a given Project. + /// + /// + /// Required. Parent value for ListMcpServersRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpServers(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpServers(request, callSettings); + } + + /// + /// Lists McpServers in a given Project. + /// + /// + /// Required. Parent value for ListMcpServersRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpServersAsync(gagr::LocationName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpServersRequest request = new ListMcpServersRequest + { + ParentAsLocationName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpServersAsync(request, callSettings); + } + + /// + /// Gets a single McpTool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpTool GetMcpTool(GetMcpToolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a single McpTool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(GetMcpToolRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Gets a single McpTool. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(GetMcpToolRequest request, st::CancellationToken cancellationToken) => + GetMcpToolAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpTool GetMcpTool(string name, gaxgrpc::CallSettings callSettings = null) => + GetMcpTool(new GetMcpToolRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(string name, gaxgrpc::CallSettings callSettings = null) => + GetMcpToolAsync(new GetMcpToolRequest + { + Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(string name, st::CancellationToken cancellationToken) => + GetMcpToolAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual McpTool GetMcpTool(McpToolName name, gaxgrpc::CallSettings callSettings = null) => + GetMcpTool(new GetMcpToolRequest + { + McpToolName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(McpToolName name, gaxgrpc::CallSettings callSettings = null) => + GetMcpToolAsync(new GetMcpToolRequest + { + McpToolName = gax::GaxPreconditions.CheckNotNull(name, nameof(name)), + }, callSettings); + + /// + /// Gets a single McpTool. + /// + /// + /// Required. Name of the resource + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task GetMcpToolAsync(McpToolName name, st::CancellationToken cancellationToken) => + GetMcpToolAsync(name, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Lists McpTools in a given McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpTools(ListMcpToolsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists McpTools in a given McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpToolsAsync(ListMcpToolsRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Lists McpTools in a given McpServer. + /// + /// + /// Required. Parent value for ListMcpToolsRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpTools(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpToolsRequest request = new ListMcpToolsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpTools(request, callSettings); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// + /// Required. Parent value for ListMcpToolsRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpToolsAsync(string parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpToolsRequest request = new ListMcpToolsRequest + { + Parent = gax::GaxPreconditions.CheckNotNullOrEmpty(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpToolsAsync(request, callSettings); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// + /// Required. Parent value for ListMcpToolsRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public virtual gax::PagedEnumerable ListMcpTools(McpServerName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpTools(request, callSettings); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// + /// Required. Parent value for ListMcpToolsRequest + /// + /// + /// The token returned from the previous request. A value of null or an empty string retrieves the first + /// page. + /// + /// + /// The size of page to request. The response will not be larger than this, but may be smaller. A value of + /// null or 0 uses a server-defined page size. + /// + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public virtual gax::PagedAsyncEnumerable ListMcpToolsAsync(McpServerName parent, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) + { + ListMcpToolsRequest request = new ListMcpToolsRequest + { + ParentAsMcpServerName = gax::GaxPreconditions.CheckNotNull(parent, nameof(parent)), + }; + if (pageToken != null) + { + request.PageToken = pageToken; + } + if (pageSize != null) + { + request.PageSize = pageSize.Value; + } + return ListMcpToolsAsync(request, callSettings); + } + } + + /// CloudApiRegistry client wrapper implementation, for convenient use. + /// + /// The Cloud API Registry service provides a central registry for managing API + /// Data. + /// + public sealed partial class CloudApiRegistryClientImpl : CloudApiRegistryClient + { + private readonly gaxgrpc::ApiCall _callGetMcpServer; + + private readonly gaxgrpc::ApiCall _callListMcpServers; + + private readonly gaxgrpc::ApiCall _callGetMcpTool; + + private readonly gaxgrpc::ApiCall _callListMcpTools; + + /// + /// Constructs a client wrapper for the CloudApiRegistry service, with the specified gRPC client and settings. + /// + /// The underlying gRPC client. + /// The base used within this client. + /// Optional to use within this client. + public CloudApiRegistryClientImpl(CloudApiRegistry.CloudApiRegistryClient grpcClient, CloudApiRegistrySettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + CloudApiRegistrySettings effectiveSettings = settings ?? CloudApiRegistrySettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + LocationsClient = new gcl::LocationsClientImpl(grpcClient.CreateLocationsClient(), effectiveSettings.LocationsSettings, logger); + _callGetMcpServer = clientHelper.BuildApiCall("GetMcpServer", grpcClient.GetMcpServerAsync, grpcClient.GetMcpServer, effectiveSettings.GetMcpServerSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetMcpServer); + Modify_GetMcpServerApiCall(ref _callGetMcpServer); + _callListMcpServers = clientHelper.BuildApiCall("ListMcpServers", grpcClient.ListMcpServersAsync, grpcClient.ListMcpServers, effectiveSettings.ListMcpServersSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListMcpServers); + Modify_ListMcpServersApiCall(ref _callListMcpServers); + _callGetMcpTool = clientHelper.BuildApiCall("GetMcpTool", grpcClient.GetMcpToolAsync, grpcClient.GetMcpTool, effectiveSettings.GetMcpToolSettings).WithGoogleRequestParam("name", request => request.Name); + Modify_ApiCall(ref _callGetMcpTool); + Modify_GetMcpToolApiCall(ref _callGetMcpTool); + _callListMcpTools = clientHelper.BuildApiCall("ListMcpTools", grpcClient.ListMcpToolsAsync, grpcClient.ListMcpTools, effectiveSettings.ListMcpToolsSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callListMcpTools); + Modify_ListMcpToolsApiCall(ref _callListMcpTools); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_GetMcpServerApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListMcpServersApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_GetMcpToolApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_ListMcpToolsApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(CloudApiRegistry.CloudApiRegistryClient grpcClient, CloudApiRegistrySettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC CloudApiRegistry client + public override CloudApiRegistry.CloudApiRegistryClient GrpcClient { get; } + + /// The associated with this client. + public override gcl::LocationsClient LocationsClient { get; } + + partial void Modify_GetMcpServerRequest(ref GetMcpServerRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListMcpServersRequest(ref ListMcpServersRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_GetMcpToolRequest(ref GetMcpToolRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_ListMcpToolsRequest(ref ListMcpToolsRequest request, ref gaxgrpc::CallSettings settings); + + /// + /// Gets a single McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override McpServer GetMcpServer(GetMcpServerRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetMcpServerRequest(ref request, ref callSettings); + return _callGetMcpServer.Sync(request, callSettings); + } + + /// + /// Gets a single McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetMcpServerAsync(GetMcpServerRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetMcpServerRequest(ref request, ref callSettings); + return _callGetMcpServer.Async(request, callSettings); + } + + /// + /// Lists McpServers in a given Project. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListMcpServers(ListMcpServersRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListMcpServersRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListMcpServers, request, callSettings); + } + + /// + /// Lists McpServers in a given Project. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListMcpServersAsync(ListMcpServersRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListMcpServersRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListMcpServers, request, callSettings); + } + + /// + /// Gets a single McpTool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override McpTool GetMcpTool(GetMcpToolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetMcpToolRequest(ref request, ref callSettings); + return _callGetMcpTool.Sync(request, callSettings); + } + + /// + /// Gets a single McpTool. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task GetMcpToolAsync(GetMcpToolRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_GetMcpToolRequest(ref request, ref callSettings); + return _callGetMcpTool.Async(request, callSettings); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable sequence of resources. + public override gax::PagedEnumerable ListMcpTools(ListMcpToolsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListMcpToolsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedEnumerable(_callListMcpTools, request, callSettings); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A pageable asynchronous sequence of resources. + public override gax::PagedAsyncEnumerable ListMcpToolsAsync(ListMcpToolsRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListMcpToolsRequest(ref request, ref callSettings); + return new gaxgrpc::GrpcPagedAsyncEnumerable(_callListMcpTools, request, callSettings); + } + } + + public partial class ListMcpServersRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListMcpToolsRequest : gaxgrpc::IPageRequest + { + } + + public partial class ListMcpServersResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => McpServers.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public partial class ListMcpToolsResponse : gaxgrpc::IPageResponse + { + /// Returns an enumerator that iterates through the resources in this response. + public scg::IEnumerator GetEnumerator() => McpTools.GetEnumerator(); + + sc::IEnumerator sc::IEnumerable.GetEnumerator() => GetEnumerator(); + } + + public static partial class CloudApiRegistry + { + public partial class CloudApiRegistryClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// + /// A new for the same target as this client. + /// + public virtual gcl::Locations.LocationsClient CreateLocationsClient() => + new gcl::Locations.LocationsClient(CallInvoker); + } + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Common.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Common.g.cs new file mode 100644 index 000000000000..ae987e01e6e0 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Common.g.cs @@ -0,0 +1,66 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apiregistry/v1beta/common.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.ApiRegistry.V1Beta { + + /// Holder for reflection information generated from google/cloud/apiregistry/v1beta/common.proto + public static partial class CommonReflection { + + #region Descriptor + /// File descriptor for google/cloud/apiregistry/v1beta/common.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CommonReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cixnb29nbGUvY2xvdWQvYXBpcmVnaXN0cnkvdjFiZXRhL2NvbW1vbi5wcm90", + "bxIfZ29vZ2xlLmNsb3VkLmFwaXJlZ2lzdHJ5LnYxYmV0YSo5CgVTdGF0ZRIV", + "ChFTVEFURV9VTlNQRUNJRklFRBAAEgsKB0VOQUJMRUQQARIMCghESVNBQkxF", + "RBACQuQBCiNjb20uZ29vZ2xlLmNsb3VkLmFwaXJlZ2lzdHJ5LnYxYmV0YUIL", + "Q29tbW9uUHJvdG9QAVpFY2xvdWQuZ29vZ2xlLmNvbS9nby9hcGlyZWdpc3Ry", + "eS9hcGl2MWJldGEvYXBpcmVnaXN0cnlwYjthcGlyZWdpc3RyeXBiqgIfR29v", + "Z2xlLkNsb3VkLkFwaVJlZ2lzdHJ5LlYxQmV0YcoCH0dvb2dsZVxDbG91ZFxB", + "cGlSZWdpc3RyeVxWMWJldGHqAiJHb29nbGU6OkNsb3VkOjpBcGlSZWdpc3Ry", + "eTo6VjFiZXRhYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.ApiRegistry.V1Beta.State), }, null, null)); + } + #endregion + + } + #region Enums + /// + /// The state of McpServer resource. + /// + public enum State { + /// + /// The McpServer state is unspecified. + /// + [pbr::OriginalName("STATE_UNSPECIFIED")] Unspecified = 0, + /// + /// The McpServer is enabled. + /// + [pbr::OriginalName("ENABLED")] Enabled = 1, + /// + /// The McpServer is disabled. + /// + [pbr::OriginalName("DISABLED")] Disabled = 2, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.csproj b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.csproj new file mode 100644 index 000000000000..61bb3be2a222 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta.csproj @@ -0,0 +1,16 @@ + + + + 1.0.0-beta00 + netstandard2.0;net462 + true + + Google;Cloud + + + + + + + + \ No newline at end of file diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/PackageApiMetadata.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/PackageApiMetadata.g.cs new file mode 100644 index 000000000000..64fc59961979 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/PackageApiMetadata.g.cs @@ -0,0 +1,54 @@ +// 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. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; + +namespace Google.Cloud.ApiRegistry.V1Beta +{ + /// Static class to provide common access to package-wide API metadata. + internal static class PackageApiMetadata + { + /// The for services in this package. + internal static gaxgrpc::ApiMetadata ApiMetadata { get; } = new gaxgrpc::ApiMetadata("Google.Cloud.ApiRegistry.V1Beta", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true) + .WithHttpRuleOverrides(new scg::Dictionary + { + { + "google.cloud.location.Locations.GetLocation", + // { "get": "/v1beta/{name=projects/*/locations/*}" } + proto::ByteString.FromBase64("EiUvdjFiZXRhL3tuYW1lPXByb2plY3RzLyovbG9jYXRpb25zLyp9") + }, + { + "google.cloud.location.Locations.ListLocations", + // { "get": "/v1beta/{name=projects/*}/locations" } + proto::ByteString.FromBase64("EiMvdjFiZXRhL3tuYW1lPXByb2plY3RzLyp9L2xvY2F0aW9ucw==") + }, + }); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return CommonReflection.Descriptor; + yield return ResourcesReflection.Descriptor; + yield return ServiceReflection.Descriptor; + yield return gcl::LocationsReflection.Descriptor; + } + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Resources.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Resources.g.cs new file mode 100644 index 000000000000..abf6405c72f7 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Resources.g.cs @@ -0,0 +1,955 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apiregistry/v1beta/resources.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.ApiRegistry.V1Beta { + + /// Holder for reflection information generated from google/cloud/apiregistry/v1beta/resources.proto + public static partial class ResourcesReflection { + + #region Descriptor + /// File descriptor for google/cloud/apiregistry/v1beta/resources.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ResourcesReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci9nb29nbGUvY2xvdWQvYXBpcmVnaXN0cnkvdjFiZXRhL3Jlc291cmNlcy5w", + "cm90bxIfZ29vZ2xlLmNsb3VkLmFwaXJlZ2lzdHJ5LnYxYmV0YRofZ29vZ2xl", + "L2FwaS9maWVsZF9iZWhhdmlvci5wcm90bxoZZ29vZ2xlL2FwaS9yZXNvdXJj", + "ZS5wcm90bxosZ29vZ2xlL2Nsb3VkL2FwaXJlZ2lzdHJ5L3YxYmV0YS9jb21t", + "b24ucHJvdG8aHGdvb2dsZS9wcm90b2J1Zi9zdHJ1Y3QucHJvdG8itQMKCU1j", + "cFNlcnZlchIRCgRuYW1lGAEgASgJQgPgQQgSGQoMZGlzcGxheV9uYW1lGAIg", + "ASgJQgPgQQESGAoLZGVzY3JpcHRpb24YAyABKAlCA+BBARIMCgR1cmxzGAQg", + "AygJEi0KDGNhcGFiaWxpdGllcxgGIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5T", + "dHJ1Y3QSOgoFc3RhdGUYByABKA4yJi5nb29nbGUuY2xvdWQuYXBpcmVnaXN0", + "cnkudjFiZXRhLlN0YXRlQgPgQQM65gHqQeIBCiljbG91ZGFwaXJlZ2lzdHJ5", + "Lmdvb2dsZWFwaXMuY29tL01jcFNlcnZlchJdcHJvamVjdHMve3Byb2plY3R9", + "L2xvY2F0aW9ucy97bG9jYXRpb259L2FwaU5hbWVzcGFjZXMve2FwaV9uYW1l", + "c3BhY2V9L21jcFNlcnZlcnMve21jcF9zZXJ2ZXJ9Ej9wcm9qZWN0cy97cHJv", + "amVjdH0vbG9jYXRpb25zL3tsb2NhdGlvbn0vbWNwU2VydmVycy97bWNwX3Nl", + "cnZlcn0qCm1jcFNlcnZlcnMyCW1jcFNlcnZlciL9AwoHTWNwVG9vbBIRCgRu", + "YW1lGAEgASgJQgPgQQgSGQoMZGlzcGxheV9uYW1lGAIgASgJQgPgQQESEwoL", + "ZGVzY3JpcHRpb24YAyABKAkSFwoPbWNwX3NlcnZlcl91cmxzGAQgAygJEi0K", + "DGlucHV0X3NjaGVtYRgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QS", + "LgoNb3V0cHV0X3NjaGVtYRgGIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1", + "Y3QSLAoLYW5ub3RhdGlvbnMYByABKAsyFy5nb29nbGUucHJvdG9idWYuU3Ry", + "dWN0OogC6kGEAgonY2xvdWRhcGlyZWdpc3RyeS5nb29nbGVhcGlzLmNvbS9N", + "Y3BUb29sEnFwcm9qZWN0cy97cHJvamVjdH0vbG9jYXRpb25zL3tsb2NhdGlv", + "bn0vYXBpTmFtZXNwYWNlcy97YXBpX25hbWVzcGFjZX0vbWNwU2VydmVycy97", + "bWNwX3NlcnZlcn0vbWNwVG9vbHMve21jcF90b29sfRJTcHJvamVjdHMve3By", + "b2plY3R9L2xvY2F0aW9ucy97bG9jYXRpb259L21jcFNlcnZlcnMve21jcF9z", + "ZXJ2ZXJ9L21jcFRvb2xzL3ttY3BfdG9vbH0qCG1jcFRvb2xzMgdtY3BUb29s", + "QucBCiNjb20uZ29vZ2xlLmNsb3VkLmFwaXJlZ2lzdHJ5LnYxYmV0YUIOUmVz", + "b3VyY2VzUHJvdG9QAVpFY2xvdWQuZ29vZ2xlLmNvbS9nby9hcGlyZWdpc3Ry", + "eS9hcGl2MWJldGEvYXBpcmVnaXN0cnlwYjthcGlyZWdpc3RyeXBiqgIfR29v", + "Z2xlLkNsb3VkLkFwaVJlZ2lzdHJ5LlYxQmV0YcoCH0dvb2dsZVxDbG91ZFxB", + "cGlSZWdpc3RyeVxWMWJldGHqAiJHb29nbGU6OkNsb3VkOjpBcGlSZWdpc3Ry", + "eTo6VjFiZXRhYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.ApiRegistry.V1Beta.CommonReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.StructReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.McpServer), global::Google.Cloud.ApiRegistry.V1Beta.McpServer.Parser, new[]{ "Name", "DisplayName", "Description", "Urls", "Capabilities", "State" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.McpTool), global::Google.Cloud.ApiRegistry.V1Beta.McpTool.Parser, new[]{ "Name", "DisplayName", "Description", "McpServerUrls", "InputSchema", "OutputSchema", "Annotations" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Represents an MCP Server. MCP Servers act as endpoints that expose a + /// collection of tools that can be invoked by agents. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class McpServer : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new McpServer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ResourcesReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpServer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpServer(McpServer other) : this() { + name_ = other.name_; + displayName_ = other.displayName_; + description_ = other.description_; + urls_ = other.urls_.Clone(); + capabilities_ = other.capabilities_ != null ? other.capabilities_.Clone() : null; + state_ = other.state_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpServer Clone() { + return new McpServer(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// 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 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 2; + private string displayName_ = ""; + /// + /// Optional. A human readable name for the MCP server. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "description" field. + public const int DescriptionFieldNumber = 3; + private string description_ = ""; + /// + /// Optional. A human-readable description of the MCP Server's functionality. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Description { + get { return description_; } + set { + description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "urls" field. + public const int UrlsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_urls_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField urls_ = new pbc::RepeatedField(); + /// + /// The base URL of the MCP server. Example: [geolocation.googleapis.com/mcp]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Urls { + get { return urls_; } + } + + /// Field number for the "capabilities" field. + public const int CapabilitiesFieldNumber = 6; + private global::Google.Protobuf.WellKnownTypes.Struct capabilities_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Capabilities { + get { return capabilities_; } + set { + capabilities_ = value; + } + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 7; + private global::Google.Cloud.ApiRegistry.V1Beta.State state_ = global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified; + /// + /// Output only. The state of the MCP Server. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.ApiRegistry.V1Beta.State State { + get { return state_; } + set { + state_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as McpServer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(McpServer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (DisplayName != other.DisplayName) return false; + if (Description != other.Description) return false; + if(!urls_.Equals(other.urls_)) return false; + if (!object.Equals(Capabilities, other.Capabilities)) return false; + if (State != other.State) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (Description.Length != 0) hash ^= Description.GetHashCode(); + hash ^= urls_.GetHashCode(); + if (capabilities_ != null) hash ^= Capabilities.GetHashCode(); + if (State != global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified) hash ^= State.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (Description.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Description); + } + urls_.WriteTo(output, _repeated_urls_codec); + if (capabilities_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Capabilities); + } + if (State != global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) State); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (Description.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Description); + } + urls_.WriteTo(ref output, _repeated_urls_codec); + if (capabilities_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Capabilities); + } + if (State != global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified) { + output.WriteRawTag(56); + output.WriteEnum((int) State); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (Description.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + } + size += urls_.CalculateSize(_repeated_urls_codec); + if (capabilities_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Capabilities); + } + if (State != global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(McpServer other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.Description.Length != 0) { + Description = other.Description; + } + urls_.Add(other.urls_); + if (other.capabilities_ != null) { + if (capabilities_ == null) { + Capabilities = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Capabilities.MergeFrom(other.Capabilities); + } + if (other.State != global::Google.Cloud.ApiRegistry.V1Beta.State.Unspecified) { + State = other.State; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 26: { + Description = input.ReadString(); + break; + } + case 34: { + urls_.AddEntriesFrom(input, _repeated_urls_codec); + break; + } + case 50: { + if (capabilities_ == null) { + Capabilities = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Capabilities); + break; + } + case 56: { + State = (global::Google.Cloud.ApiRegistry.V1Beta.State) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 26: { + Description = input.ReadString(); + break; + } + case 34: { + urls_.AddEntriesFrom(ref input, _repeated_urls_codec); + break; + } + case 50: { + if (capabilities_ == null) { + Capabilities = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Capabilities); + break; + } + case 56: { + State = (global::Google.Cloud.ApiRegistry.V1Beta.State) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// Message describing McpTool object + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class McpTool : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new McpTool()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ResourcesReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpTool() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpTool(McpTool other) : this() { + name_ = other.name_; + displayName_ = other.displayName_; + description_ = other.description_; + mcpServerUrls_ = other.mcpServerUrls_.Clone(); + inputSchema_ = other.inputSchema_ != null ? other.inputSchema_.Clone() : null; + outputSchema_ = other.outputSchema_ != null ? other.outputSchema_.Clone() : null; + annotations_ = other.annotations_ != null ? other.annotations_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public McpTool Clone() { + return new McpTool(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// 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 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 2; + private string displayName_ = ""; + /// + /// Optional. A human-readable name for the tool, suitable for display. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "description" field. + public const int DescriptionFieldNumber = 3; + private string description_ = ""; + /// + /// A human-readable description of the tool's functionality. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Description { + get { return description_; } + set { + description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mcp_server_urls" field. + public const int McpServerUrlsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_mcpServerUrls_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField mcpServerUrls_ = new pbc::RepeatedField(); + /// + /// Automatically populated reference to MCP Server. Helpful when multiple + /// tools are requested across different MCP Servers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McpServerUrls { + get { return mcpServerUrls_; } + } + + /// Field number for the "input_schema" field. + public const int InputSchemaFieldNumber = 5; + private global::Google.Protobuf.WellKnownTypes.Struct inputSchema_; + /// + /// A JSON Schema object defining the expected parameters for invoking the + /// tool. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct InputSchema { + get { return inputSchema_; } + set { + inputSchema_ = value; + } + } + + /// Field number for the "output_schema" field. + public const int OutputSchemaFieldNumber = 6; + private global::Google.Protobuf.WellKnownTypes.Struct outputSchema_; + /// + /// Optional. A JSON Schema object defining the expected structure of the + /// tool's output. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct OutputSchema { + get { return outputSchema_; } + set { + outputSchema_ = value; + } + } + + /// Field number for the "annotations" field. + public const int AnnotationsFieldNumber = 7; + private global::Google.Protobuf.WellKnownTypes.Struct annotations_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Struct Annotations { + get { return annotations_; } + set { + annotations_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as McpTool); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(McpTool other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (DisplayName != other.DisplayName) return false; + if (Description != other.Description) return false; + if(!mcpServerUrls_.Equals(other.mcpServerUrls_)) return false; + if (!object.Equals(InputSchema, other.InputSchema)) return false; + if (!object.Equals(OutputSchema, other.OutputSchema)) return false; + if (!object.Equals(Annotations, other.Annotations)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (Description.Length != 0) hash ^= Description.GetHashCode(); + hash ^= mcpServerUrls_.GetHashCode(); + if (inputSchema_ != null) hash ^= InputSchema.GetHashCode(); + if (outputSchema_ != null) hash ^= OutputSchema.GetHashCode(); + if (annotations_ != null) hash ^= Annotations.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (Description.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Description); + } + mcpServerUrls_.WriteTo(output, _repeated_mcpServerUrls_codec); + if (inputSchema_ != null) { + output.WriteRawTag(42); + output.WriteMessage(InputSchema); + } + if (outputSchema_ != null) { + output.WriteRawTag(50); + output.WriteMessage(OutputSchema); + } + if (annotations_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Annotations); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DisplayName); + } + if (Description.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Description); + } + mcpServerUrls_.WriteTo(ref output, _repeated_mcpServerUrls_codec); + if (inputSchema_ != null) { + output.WriteRawTag(42); + output.WriteMessage(InputSchema); + } + if (outputSchema_ != null) { + output.WriteRawTag(50); + output.WriteMessage(OutputSchema); + } + if (annotations_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Annotations); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (Description.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + } + size += mcpServerUrls_.CalculateSize(_repeated_mcpServerUrls_codec); + if (inputSchema_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(InputSchema); + } + if (outputSchema_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(OutputSchema); + } + if (annotations_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Annotations); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(McpTool other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + if (other.Description.Length != 0) { + Description = other.Description; + } + mcpServerUrls_.Add(other.mcpServerUrls_); + if (other.inputSchema_ != null) { + if (inputSchema_ == null) { + InputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + InputSchema.MergeFrom(other.InputSchema); + } + if (other.outputSchema_ != null) { + if (outputSchema_ == null) { + OutputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + OutputSchema.MergeFrom(other.OutputSchema); + } + if (other.annotations_ != null) { + if (annotations_ == null) { + Annotations = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + Annotations.MergeFrom(other.Annotations); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 26: { + Description = input.ReadString(); + break; + } + case 34: { + mcpServerUrls_.AddEntriesFrom(input, _repeated_mcpServerUrls_codec); + break; + } + case 42: { + if (inputSchema_ == null) { + InputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(InputSchema); + break; + } + case 50: { + if (outputSchema_ == null) { + OutputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(OutputSchema); + break; + } + case 58: { + if (annotations_ == null) { + Annotations = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Annotations); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + DisplayName = input.ReadString(); + break; + } + case 26: { + Description = input.ReadString(); + break; + } + case 34: { + mcpServerUrls_.AddEntriesFrom(ref input, _repeated_mcpServerUrls_codec); + break; + } + case 42: { + if (inputSchema_ == null) { + InputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(InputSchema); + break; + } + case 50: { + if (outputSchema_ == null) { + OutputSchema = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(OutputSchema); + break; + } + case 58: { + if (annotations_ == null) { + Annotations = new global::Google.Protobuf.WellKnownTypes.Struct(); + } + input.ReadMessage(Annotations); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ResourcesResourceNames.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ResourcesResourceNames.g.cs new file mode 100644 index 000000000000..5aece786ba7c --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ResourcesResourceNames.g.cs @@ -0,0 +1,724 @@ +// 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. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gcav = Google.Cloud.ApiRegistry.V1Beta; +using sys = System; + +namespace Google.Cloud.ApiRegistry.V1Beta +{ + /// Resource name for the McpServer resource. + public sealed partial class McpServerName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + ProjectLocationApiNamespaceMcpServer = 1, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/mcpServers/{mcp_server}. + /// + ProjectLocationMcpServer = 2, + } + + private static gax::PathTemplate s_projectLocationApiNamespaceMcpServer = new gax::PathTemplate("projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}"); + + private static gax::PathTemplate s_projectLocationMcpServer = new gax::PathTemplate("projects/{project}/locations/{location}/mcpServers/{mcp_server}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static McpServerName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new McpServerName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static McpServerName FromProjectLocationApiNamespaceMcpServer(string projectId, string locationId, string apiNamespaceId, string mcpServerId) => + new McpServerName(ResourceNameType.ProjectLocationApiNamespaceMcpServer, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static McpServerName FromProjectLocationMcpServer(string projectId, string locationId, string mcpServerId) => + new McpServerName(ResourceNameType.ProjectLocationMcpServer, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + public static string Format(string projectId, string locationId, string apiNamespaceId, string mcpServerId) => + FormatProjectLocationApiNamespaceMcpServer(projectId, locationId, apiNamespaceId, mcpServerId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}. + /// + public static string FormatProjectLocationApiNamespaceMcpServer(string projectId, string locationId, string apiNamespaceId, string mcpServerId) => + s_projectLocationApiNamespaceMcpServer.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}. + /// + public static string FormatProjectLocationMcpServer(string projectId, string locationId, string mcpServerId) => + s_projectLocationMcpServer.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server} + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static McpServerName Parse(string mcpServerName) => Parse(mcpServerName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing + /// an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server} + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static McpServerName Parse(string mcpServerName, bool allowUnparsed) => + TryParse(mcpServerName, allowUnparsed, out McpServerName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server} + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string mcpServerName, out McpServerName result) => TryParse(mcpServerName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server} + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string mcpServerName, bool allowUnparsed, out McpServerName result) + { + gax::GaxPreconditions.CheckNotNull(mcpServerName, nameof(mcpServerName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationApiNamespaceMcpServer.TryParseName(mcpServerName, out resourceName)) + { + result = FromProjectLocationApiNamespaceMcpServer(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (s_projectLocationMcpServer.TryParseName(mcpServerName, out resourceName)) + { + result = FromProjectLocationMcpServer(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(mcpServerName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private McpServerName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string apiNamespaceId = null, string locationId = null, string mcpServerId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ApiNamespaceId = apiNamespaceId; + LocationId = locationId; + McpServerId = mcpServerId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + public McpServerName(string projectId, string locationId, string apiNamespaceId, string mcpServerId) : this(ResourceNameType.ProjectLocationApiNamespaceMcpServer, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The ApiNamespace ID. May be null, depending on which resource name is contained by this + /// instance. + /// + public string ApiNamespaceId { get; } + + /// + /// The Location ID. May be null, depending on which resource name is contained by this instance. + /// + public string LocationId { get; } + + /// + /// The McpServer ID. May be null, depending on which resource name is contained by this instance. + /// + public string McpServerId { get; } + + /// + /// The Project ID. May be null, depending on which resource name is contained by this instance. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationApiNamespaceMcpServer: return s_projectLocationApiNamespaceMcpServer.Expand(ProjectId, LocationId, ApiNamespaceId, McpServerId); + case ResourceNameType.ProjectLocationMcpServer: return s_projectLocationMcpServer.Expand(ProjectId, LocationId, McpServerId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as McpServerName); + + /// + public bool Equals(McpServerName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(McpServerName a, McpServerName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(McpServerName a, McpServerName b) => !(a == b); + } + + /// Resource name for the McpTool resource. + public sealed partial class McpToolName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + ProjectLocationApiNamespaceMcpServerMcpTool = 1, + + /// + /// A resource name with pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}. + /// + ProjectLocationMcpServerMcpTool = 2, + } + + private static gax::PathTemplate s_projectLocationApiNamespaceMcpServerMcpTool = new gax::PathTemplate("projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}"); + + private static gax::PathTemplate s_projectLocationMcpServerMcpTool = new gax::PathTemplate("projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static McpToolName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new McpToolName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static McpToolName FromProjectLocationApiNamespaceMcpServerMcpTool(string projectId, string locationId, string apiNamespaceId, string mcpServerId, string mcpToolId) => + new McpToolName(ResourceNameType.ProjectLocationApiNamespaceMcpServerMcpTool, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId)), mcpToolId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpToolId, nameof(mcpToolId))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static McpToolName FromProjectLocationMcpServerMcpTool(string projectId, string locationId, string mcpServerId, string mcpToolId) => + new McpToolName(ResourceNameType.ProjectLocationMcpServerMcpTool, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId)), mcpToolId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpToolId, nameof(mcpToolId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + public static string Format(string projectId, string locationId, string apiNamespaceId, string mcpServerId, string mcpToolId) => + FormatProjectLocationApiNamespaceMcpServerMcpTool(projectId, locationId, apiNamespaceId, mcpServerId, mcpToolId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// . + /// + public static string FormatProjectLocationApiNamespaceMcpServerMcpTool(string projectId, string locationId, string apiNamespaceId, string mcpServerId, string mcpToolId) => + s_projectLocationApiNamespaceMcpServerMcpTool.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpToolId, nameof(mcpToolId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool}. + /// + public static string FormatProjectLocationMcpServerMcpTool(string projectId, string locationId, string mcpServerId, string mcpToolId) => + s_projectLocationMcpServerMcpTool.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId)), gax::GaxPreconditions.CheckNotNullOrEmpty(mcpToolId, nameof(mcpToolId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static McpToolName Parse(string mcpToolName) => Parse(mcpToolName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static McpToolName Parse(string mcpToolName, bool allowUnparsed) => + TryParse(mcpToolName, allowUnparsed, out McpToolName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string mcpToolName, out McpToolName result) => TryParse(mcpToolName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// + /// projects/{project}/locations/{location}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string mcpToolName, bool allowUnparsed, out McpToolName result) + { + gax::GaxPreconditions.CheckNotNull(mcpToolName, nameof(mcpToolName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationApiNamespaceMcpServerMcpTool.TryParseName(mcpToolName, out resourceName)) + { + result = FromProjectLocationApiNamespaceMcpServerMcpTool(resourceName[0], resourceName[1], resourceName[2], resourceName[3], resourceName[4]); + return true; + } + if (s_projectLocationMcpServerMcpTool.TryParseName(mcpToolName, out resourceName)) + { + result = FromProjectLocationMcpServerMcpTool(resourceName[0], resourceName[1], resourceName[2], resourceName[3]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(mcpToolName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private McpToolName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string apiNamespaceId = null, string locationId = null, string mcpServerId = null, string mcpToolId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ApiNamespaceId = apiNamespaceId; + LocationId = locationId; + McpServerId = mcpServerId; + McpToolId = mcpToolId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}/mcpServers/{mcp_server}/mcpTools/{mcp_tool} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// The McpServer ID. Must not be null or empty. + /// The McpTool ID. Must not be null or empty. + public McpToolName(string projectId, string locationId, string apiNamespaceId, string mcpServerId, string mcpToolId) : this(ResourceNameType.ProjectLocationApiNamespaceMcpServerMcpTool, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId)), mcpServerId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpServerId, nameof(mcpServerId)), mcpToolId: gax::GaxPreconditions.CheckNotNullOrEmpty(mcpToolId, nameof(mcpToolId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The ApiNamespace ID. May be null, depending on which resource name is contained by this + /// instance. + /// + public string ApiNamespaceId { get; } + + /// + /// The Location ID. May be null, depending on which resource name is contained by this instance. + /// + public string LocationId { get; } + + /// + /// The McpServer ID. May be null, depending on which resource name is contained by this instance. + /// + public string McpServerId { get; } + + /// + /// The McpTool ID. May be null, depending on which resource name is contained by this instance. + /// + public string McpToolId { get; } + + /// + /// The Project ID. May be null, depending on which resource name is contained by this instance. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationApiNamespaceMcpServerMcpTool: return s_projectLocationApiNamespaceMcpServerMcpTool.Expand(ProjectId, LocationId, ApiNamespaceId, McpServerId, McpToolId); + case ResourceNameType.ProjectLocationMcpServerMcpTool: return s_projectLocationMcpServerMcpTool.Expand(ProjectId, LocationId, McpServerId, McpToolId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as McpToolName); + + /// + public bool Equals(McpToolName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(McpToolName a, McpToolName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(McpToolName a, McpToolName b) => !(a == b); + } + + public partial class McpServer + { + /// + /// -typed view over the resource name property. + /// + public gcav::McpServerName McpServerName + { + get => string.IsNullOrEmpty(Name) ? null : gcav::McpServerName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class McpTool + { + /// + /// -typed view over the resource name property. + /// + public gcav::McpToolName McpToolName + { + get => string.IsNullOrEmpty(Name) ? null : gcav::McpToolName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Service.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Service.g.cs new file mode 100644 index 000000000000..3413c8c9360a --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/Service.g.cs @@ -0,0 +1,1711 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apiregistry/v1beta/service.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.ApiRegistry.V1Beta { + + /// Holder for reflection information generated from google/cloud/apiregistry/v1beta/service.proto + public static partial class ServiceReflection { + + #region Descriptor + /// File descriptor for google/cloud/apiregistry/v1beta/service.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ServiceReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci1nb29nbGUvY2xvdWQvYXBpcmVnaXN0cnkvdjFiZXRhL3NlcnZpY2UucHJv", + "dG8SH2dvb2dsZS5jbG91ZC5hcGlyZWdpc3RyeS52MWJldGEaHGdvb2dsZS9h", + "cGkvYW5ub3RhdGlvbnMucHJvdG8aF2dvb2dsZS9hcGkvY2xpZW50LnByb3Rv", + "Gh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9yLnByb3RvGhlnb29nbGUvYXBp", + "L3Jlc291cmNlLnByb3RvGi9nb29nbGUvY2xvdWQvYXBpcmVnaXN0cnkvdjFi", + "ZXRhL3Jlc291cmNlcy5wcm90byJWChNHZXRNY3BTZXJ2ZXJSZXF1ZXN0Ej8K", + "BG5hbWUYASABKAlCMeBBAvpBKwopY2xvdWRhcGlyZWdpc3RyeS5nb29nbGVh", + "cGlzLmNvbS9NY3BTZXJ2ZXIirwEKFUxpc3RNY3BTZXJ2ZXJzUmVxdWVzdBI5", + "CgZwYXJlbnQYASABKAlCKeBBAvpBIwohbG9jYXRpb25zLmdvb2dsZWFwaXMu", + "Y29tL0xvY2F0aW9uEhYKCXBhZ2Vfc2l6ZRgCIAEoBUID4EEBEhcKCnBhZ2Vf", + "dG9rZW4YAyABKAlCA+BBARITCgZmaWx0ZXIYBCABKAlCA+BBARIVCghvcmRl", + "cl9ieRgFIAEoCUID4EEBIocBChZMaXN0TWNwU2VydmVyc1Jlc3BvbnNlEj8K", + "C21jcF9zZXJ2ZXJzGAEgAygLMiouZ29vZ2xlLmNsb3VkLmFwaXJlZ2lzdHJ5", + "LnYxYmV0YS5NY3BTZXJ2ZXISFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJEhMK", + "C3VucmVhY2hhYmxlGAMgAygJIlIKEUdldE1jcFRvb2xSZXF1ZXN0Ej0KBG5h", + "bWUYASABKAlCL+BBAvpBKQonY2xvdWRhcGlyZWdpc3RyeS5nb29nbGVhcGlz", + "LmNvbS9NY3BUb29sIrMBChNMaXN0TWNwVG9vbHNSZXF1ZXN0Ej8KBnBhcmVu", + "dBgBIAEoCUIv4EEC+kEpEidjbG91ZGFwaXJlZ2lzdHJ5Lmdvb2dsZWFwaXMu", + "Y29tL01jcFRvb2wSFgoJcGFnZV9zaXplGAIgASgFQgPgQQESFwoKcGFnZV90", + "b2tlbhgDIAEoCUID4EEBEhMKBmZpbHRlchgEIAEoCUID4EEBEhUKCG9yZGVy", + "X2J5GAUgASgJQgPgQQEigQEKFExpc3RNY3BUb29sc1Jlc3BvbnNlEjsKCW1j", + "cF90b29scxgBIAMoCzIoLmdvb2dsZS5jbG91ZC5hcGlyZWdpc3RyeS52MWJl", + "dGEuTWNwVG9vbBIXCg9uZXh0X3BhZ2VfdG9rZW4YAiABKAkSEwoLdW5yZWFj", + "aGFibGUYAyADKAky7wYKEENsb3VkQXBpUmVnaXN0cnkSswEKDEdldE1jcFNl", + "cnZlchI0Lmdvb2dsZS5jbG91ZC5hcGlyZWdpc3RyeS52MWJldGEuR2V0TWNw", + "U2VydmVyUmVxdWVzdBoqLmdvb2dsZS5jbG91ZC5hcGlyZWdpc3RyeS52MWJl", + "dGEuTWNwU2VydmVyIkHaQQRuYW1lgtPkkwI0EjIvdjFiZXRhL3tuYW1lPXBy", + "b2plY3RzLyovbG9jYXRpb25zLyovbWNwU2VydmVycy8qfRLGAQoOTGlzdE1j", + "cFNlcnZlcnMSNi5nb29nbGUuY2xvdWQuYXBpcmVnaXN0cnkudjFiZXRhLkxp", + "c3RNY3BTZXJ2ZXJzUmVxdWVzdBo3Lmdvb2dsZS5jbG91ZC5hcGlyZWdpc3Ry", + "eS52MWJldGEuTGlzdE1jcFNlcnZlcnNSZXNwb25zZSJD2kEGcGFyZW50gtPk", + "kwI0EjIvdjFiZXRhL3twYXJlbnQ9cHJvamVjdHMvKi9sb2NhdGlvbnMvKn0v", + "bWNwU2VydmVycxK4AQoKR2V0TWNwVG9vbBIyLmdvb2dsZS5jbG91ZC5hcGly", + "ZWdpc3RyeS52MWJldGEuR2V0TWNwVG9vbFJlcXVlc3QaKC5nb29nbGUuY2xv", + "dWQuYXBpcmVnaXN0cnkudjFiZXRhLk1jcFRvb2wiTNpBBG5hbWWC0+STAj8S", + "PS92MWJldGEve25hbWU9cHJvamVjdHMvKi9sb2NhdGlvbnMvKi9tY3BTZXJ2", + "ZXJzLyovbWNwVG9vbHMvKn0SywEKDExpc3RNY3BUb29scxI0Lmdvb2dsZS5j", + "bG91ZC5hcGlyZWdpc3RyeS52MWJldGEuTGlzdE1jcFRvb2xzUmVxdWVzdBo1", + "Lmdvb2dsZS5jbG91ZC5hcGlyZWdpc3RyeS52MWJldGEuTGlzdE1jcFRvb2xz", + "UmVzcG9uc2UiTtpBBnBhcmVudILT5JMCPxI9L3YxYmV0YS97cGFyZW50PXBy", + "b2plY3RzLyovbG9jYXRpb25zLyovbWNwU2VydmVycy8qfS9tY3BUb29scxpT", + "ykEfY2xvdWRhcGlyZWdpc3RyeS5nb29nbGVhcGlzLmNvbdJBLmh0dHBzOi8v", + "d3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvY2xvdWQtcGxhdGZvcm1C3QIKI2Nv", + "bS5nb29nbGUuY2xvdWQuYXBpcmVnaXN0cnkudjFiZXRhQgxTZXJ2aWNlUHJv", + "dG9QAVpFY2xvdWQuZ29vZ2xlLmNvbS9nby9hcGlyZWdpc3RyeS9hcGl2MWJl", + "dGEvYXBpcmVnaXN0cnlwYjthcGlyZWdpc3RyeXBiqgIfR29vZ2xlLkNsb3Vk", + "LkFwaVJlZ2lzdHJ5LlYxQmV0YcoCH0dvb2dsZVxDbG91ZFxBcGlSZWdpc3Ry", + "eVxWMWJldGHqAiJHb29nbGU6OkNsb3VkOjpBcGlSZWdpc3RyeTo6VjFiZXRh", + "6kF1CixjbG91ZGFwaXJlZ2lzdHJ5Lmdvb2dsZWFwaXMuY29tL0FwaU5hbWVz", + "cGFjZRJFcHJvamVjdHMve3Byb2plY3R9L2xvY2F0aW9ucy97bG9jYXRpb259", + "L2FwaU5hbWVzcGFjZXMve2FwaV9uYW1lc3BhY2V9YgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, global::Google.Cloud.ApiRegistry.V1Beta.ResourcesReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest), global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest), global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter", "OrderBy" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersResponse), global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersResponse.Parser, new[]{ "McpServers", "NextPageToken", "Unreachable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest), global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest), global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest.Parser, new[]{ "Parent", "PageSize", "PageToken", "Filter", "OrderBy" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsResponse), global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsResponse.Parser, new[]{ "McpTools", "NextPageToken", "Unreachable" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message for getting a McpServer + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetMcpServerRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetMcpServerRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpServerRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpServerRequest(GetMcpServerRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpServerRequest Clone() { + return new GetMcpServerRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Name of the resource + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetMcpServerRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetMcpServerRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetMcpServerRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Message for requesting list of McpServers + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListMcpServersRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListMcpServersRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersRequest(ListMcpServersRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersRequest Clone() { + return new ListMcpServersRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. Parent value for ListMcpServersRequest + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Requested page size. Server may return fewer items than + /// requested. If unspecified, server will pick an appropriate default. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Optional. A token identifying a page of results the server should return. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filter" field. + public const int FilterFieldNumber = 4; + private string filter_ = ""; + /// + /// Optional. Filtering results + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Optional. Hint for how to order the results + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListMcpServersRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListMcpServersRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListMcpServersRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Message for response to listing McpServers + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListMcpServersResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListMcpServersResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersResponse(ListMcpServersResponse other) : this() { + mcpServers_ = other.mcpServers_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpServersResponse Clone() { + return new ListMcpServersResponse(this); + } + + /// Field number for the "mcp_servers" field. + public const int McpServersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_mcpServers_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.ApiRegistry.V1Beta.McpServer.Parser); + private readonly pbc::RepeatedField mcpServers_ = new pbc::RepeatedField(); + /// + /// The list of McpServer + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McpServers { + get { return mcpServers_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// A token identifying a page of results the server should return. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListMcpServersResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListMcpServersResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!mcpServers_.Equals(other.mcpServers_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= mcpServers_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + mcpServers_.WriteTo(output, _repeated_mcpServers_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + mcpServers_.WriteTo(ref output, _repeated_mcpServers_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += mcpServers_.CalculateSize(_repeated_mcpServers_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListMcpServersResponse other) { + if (other == null) { + return; + } + mcpServers_.Add(other.mcpServers_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + mcpServers_.AddEntriesFrom(input, _repeated_mcpServers_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + mcpServers_.AddEntriesFrom(ref input, _repeated_mcpServers_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Message for getting a McpTool + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetMcpToolRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetMcpToolRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpToolRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpToolRequest(GetMcpToolRequest other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetMcpToolRequest Clone() { + return new GetMcpToolRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Required. Name of the resource + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetMcpToolRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetMcpToolRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetMcpToolRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Message for requesting list of McpTools + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListMcpToolsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListMcpToolsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsRequest(ListMcpToolsRequest other) : this() { + parent_ = other.parent_; + pageSize_ = other.pageSize_; + pageToken_ = other.pageToken_; + filter_ = other.filter_; + orderBy_ = other.orderBy_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsRequest Clone() { + return new ListMcpToolsRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// Required. Parent value for ListMcpToolsRequest + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "page_size" field. + public const int PageSizeFieldNumber = 2; + private int pageSize_; + /// + /// Optional. Requested page size. Server may return fewer items than + /// requested. If unspecified, server will pick an appropriate default. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PageSize { + get { return pageSize_; } + set { + pageSize_ = value; + } + } + + /// Field number for the "page_token" field. + public const int PageTokenFieldNumber = 3; + private string pageToken_ = ""; + /// + /// Optional. A token identifying a page of results the server should return. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PageToken { + get { return pageToken_; } + set { + pageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filter" field. + public const int FilterFieldNumber = 4; + private string filter_ = ""; + /// + /// Optional. Filtering results + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filter { + get { return filter_; } + set { + filter_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "order_by" field. + public const int OrderByFieldNumber = 5; + private string orderBy_ = ""; + /// + /// Optional. Hint for how to order the results + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OrderBy { + get { return orderBy_; } + set { + orderBy_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListMcpToolsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListMcpToolsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (PageSize != other.PageSize) return false; + if (PageToken != other.PageToken) return false; + if (Filter != other.Filter) return false; + if (OrderBy != other.OrderBy) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (PageSize != 0) hash ^= PageSize.GetHashCode(); + if (PageToken.Length != 0) hash ^= PageToken.GetHashCode(); + if (Filter.Length != 0) hash ^= Filter.GetHashCode(); + if (OrderBy.Length != 0) hash ^= OrderBy.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (PageSize != 0) { + output.WriteRawTag(16); + output.WriteInt32(PageSize); + } + if (PageToken.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PageToken); + } + if (Filter.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filter); + } + if (OrderBy.Length != 0) { + output.WriteRawTag(42); + output.WriteString(OrderBy); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (PageSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize); + } + if (PageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PageToken); + } + if (Filter.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filter); + } + if (OrderBy.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OrderBy); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListMcpToolsRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.PageSize != 0) { + PageSize = other.PageSize; + } + if (other.PageToken.Length != 0) { + PageToken = other.PageToken; + } + if (other.Filter.Length != 0) { + Filter = other.Filter; + } + if (other.OrderBy.Length != 0) { + OrderBy = other.OrderBy; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 16: { + PageSize = input.ReadInt32(); + break; + } + case 26: { + PageToken = input.ReadString(); + break; + } + case 34: { + Filter = input.ReadString(); + break; + } + case 42: { + OrderBy = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Message for response to listing McpTools + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListMcpToolsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListMcpToolsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsResponse(ListMcpToolsResponse other) : this() { + mcpTools_ = other.mcpTools_.Clone(); + nextPageToken_ = other.nextPageToken_; + unreachable_ = other.unreachable_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListMcpToolsResponse Clone() { + return new ListMcpToolsResponse(this); + } + + /// Field number for the "mcp_tools" field. + public const int McpToolsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_mcpTools_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.ApiRegistry.V1Beta.McpTool.Parser); + private readonly pbc::RepeatedField mcpTools_ = new pbc::RepeatedField(); + /// + /// The list of McpTool + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McpTools { + get { return mcpTools_; } + } + + /// Field number for the "next_page_token" field. + public const int NextPageTokenFieldNumber = 2; + private string nextPageToken_ = ""; + /// + /// A token identifying a page of results the server should return. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NextPageToken { + get { return nextPageToken_; } + set { + nextPageToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "unreachable" field. + public const int UnreachableFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_unreachable_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField unreachable_ = new pbc::RepeatedField(); + /// + /// Locations that could not be reached. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Unreachable { + get { return unreachable_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListMcpToolsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListMcpToolsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!mcpTools_.Equals(other.mcpTools_)) return false; + if (NextPageToken != other.NextPageToken) return false; + if(!unreachable_.Equals(other.unreachable_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= mcpTools_.GetHashCode(); + if (NextPageToken.Length != 0) hash ^= NextPageToken.GetHashCode(); + hash ^= unreachable_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + mcpTools_.WriteTo(output, _repeated_mcpTools_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + mcpTools_.WriteTo(ref output, _repeated_mcpTools_codec); + if (NextPageToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(NextPageToken); + } + unreachable_.WriteTo(ref output, _repeated_unreachable_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += mcpTools_.CalculateSize(_repeated_mcpTools_codec); + if (NextPageToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NextPageToken); + } + size += unreachable_.CalculateSize(_repeated_unreachable_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListMcpToolsResponse other) { + if (other == null) { + return; + } + mcpTools_.Add(other.mcpTools_); + if (other.NextPageToken.Length != 0) { + NextPageToken = other.NextPageToken; + } + unreachable_.Add(other.unreachable_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + mcpTools_.AddEntriesFrom(input, _repeated_mcpTools_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(input, _repeated_unreachable_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + mcpTools_.AddEntriesFrom(ref input, _repeated_mcpTools_codec); + break; + } + case 18: { + NextPageToken = input.ReadString(); + break; + } + case 26: { + unreachable_.AddEntriesFrom(ref input, _repeated_unreachable_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceCollectionExtensions.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceCollectionExtensions.g.cs new file mode 100644 index 000000000000..99ef3860a464 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceCollectionExtensions.g.cs @@ -0,0 +1,67 @@ +// 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. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gcav = Google.Cloud.ApiRegistry.V1Beta; +using gcl = Google.Cloud.Location; +using gpr = Google.Protobuf.Reflection; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sys = System; + +namespace Microsoft.Extensions.DependencyInjection +{ + /// Static class to provide extension methods to configure API clients. + public static partial class ServiceCollectionExtensions + { + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddCloudApiRegistryClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gcav::CloudApiRegistryClientBuilder builder = new gcav::CloudApiRegistryClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddCloudApiRegistryClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gcav::CloudApiRegistryClientBuilder builder = new gcav::CloudApiRegistryClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceGrpc.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceGrpc.g.cs new file mode 100644 index 000000000000..fe9f0b81e21e --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceGrpc.g.cs @@ -0,0 +1,430 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/apiregistry/v1beta/service.proto +// +// Original file comments: +// 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. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.ApiRegistry.V1Beta { + /// + /// The Cloud API Registry service provides a central registry for managing API + /// Data. + /// + public static partial class CloudApiRegistry + { + static readonly string __ServiceName = "google.cloud.apiregistry.v1beta.CloudApiRegistry"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_GetMcpServerRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_McpServer = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.McpServer.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_ListMcpServersRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_ListMcpServersResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_GetMcpToolRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_McpTool = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.McpTool.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_ListMcpToolsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_apiregistry_v1beta_ListMcpToolsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetMcpServer = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetMcpServer", + __Marshaller_google_cloud_apiregistry_v1beta_GetMcpServerRequest, + __Marshaller_google_cloud_apiregistry_v1beta_McpServer); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListMcpServers = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListMcpServers", + __Marshaller_google_cloud_apiregistry_v1beta_ListMcpServersRequest, + __Marshaller_google_cloud_apiregistry_v1beta_ListMcpServersResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_GetMcpTool = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "GetMcpTool", + __Marshaller_google_cloud_apiregistry_v1beta_GetMcpToolRequest, + __Marshaller_google_cloud_apiregistry_v1beta_McpTool); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListMcpTools = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListMcpTools", + __Marshaller_google_cloud_apiregistry_v1beta_ListMcpToolsRequest, + __Marshaller_google_cloud_apiregistry_v1beta_ListMcpToolsResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.ApiRegistry.V1Beta.ServiceReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of CloudApiRegistry + [grpc::BindServiceMethod(typeof(CloudApiRegistry), "BindService")] + public abstract partial class CloudApiRegistryBase + { + /// + /// Gets a single McpServer. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetMcpServer(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Lists McpServers in a given Project. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListMcpServers(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Gets a single McpTool. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task GetMcpTool(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Lists McpTools in a given McpServer. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListMcpTools(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for CloudApiRegistry + public partial class CloudApiRegistryClient : grpc::ClientBase + { + /// Creates a new client for CloudApiRegistry + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public CloudApiRegistryClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for CloudApiRegistry that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public CloudApiRegistryClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected CloudApiRegistryClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected CloudApiRegistryClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Gets a single McpServer. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.McpServer GetMcpServer(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetMcpServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a single McpServer. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.McpServer GetMcpServer(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetMcpServer, null, options, request); + } + /// + /// Gets a single McpServer. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetMcpServerAsync(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetMcpServerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a single McpServer. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetMcpServerAsync(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpServerRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetMcpServer, null, options, request); + } + /// + /// Lists McpServers in a given Project. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersResponse ListMcpServers(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListMcpServers(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists McpServers in a given Project. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersResponse ListMcpServers(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListMcpServers, null, options, request); + } + /// + /// Lists McpServers in a given Project. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListMcpServersAsync(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListMcpServersAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists McpServers in a given Project. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListMcpServersAsync(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpServersRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListMcpServers, null, options, request); + } + /// + /// Gets a single McpTool. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.McpTool GetMcpTool(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetMcpTool(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a single McpTool. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.McpTool GetMcpTool(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_GetMcpTool, null, options, request); + } + /// + /// Gets a single McpTool. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetMcpToolAsync(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return GetMcpToolAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Gets a single McpTool. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall GetMcpToolAsync(global::Google.Cloud.ApiRegistry.V1Beta.GetMcpToolRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_GetMcpTool, null, options, request); + } + /// + /// Lists McpTools in a given McpServer. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsResponse ListMcpTools(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListMcpTools(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists McpTools in a given McpServer. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsResponse ListMcpTools(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListMcpTools, null, options, request); + } + /// + /// Lists McpTools in a given McpServer. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListMcpToolsAsync(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListMcpToolsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Lists McpTools in a given McpServer. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListMcpToolsAsync(global::Google.Cloud.ApiRegistry.V1Beta.ListMcpToolsRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListMcpTools, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override CloudApiRegistryClient NewInstance(ClientBaseConfiguration configuration) + { + return new CloudApiRegistryClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(CloudApiRegistryBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_GetMcpServer, serviceImpl.GetMcpServer) + .AddMethod(__Method_ListMcpServers, serviceImpl.ListMcpServers) + .AddMethod(__Method_GetMcpTool, serviceImpl.GetMcpTool) + .AddMethod(__Method_ListMcpTools, serviceImpl.ListMcpTools).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, CloudApiRegistryBase serviceImpl) + { + serviceBinder.AddMethod(__Method_GetMcpServer, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetMcpServer)); + serviceBinder.AddMethod(__Method_ListMcpServers, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListMcpServers)); + serviceBinder.AddMethod(__Method_GetMcpTool, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.GetMcpTool)); + serviceBinder.AddMethod(__Method_ListMcpTools, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListMcpTools)); + } + + } +} +#endregion diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceResourceNames.g.cs b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceResourceNames.g.cs new file mode 100644 index 000000000000..a41447b3c6bd --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/Google.Cloud.ApiRegistry.V1Beta/ServiceResourceNames.g.cs @@ -0,0 +1,325 @@ +// 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. + +// Generated code. DO NOT EDIT! + +#pragma warning disable CS8981 +using gagr = Google.Api.Gax.ResourceNames; +using gax = Google.Api.Gax; +using gcav = Google.Cloud.ApiRegistry.V1Beta; +using sys = System; + +namespace Google.Cloud.ApiRegistry.V1Beta +{ + /// Resource name for the ApiNamespace resource. + public sealed partial class ApiNamespaceName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// . + /// + ProjectLocationApiNamespace = 1, + } + + private static gax::PathTemplate s_projectLocationApiNamespace = new gax::PathTemplate("projects/{project}/locations/{location}/apiNamespaces/{api_namespace}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided + /// . + /// + public static ApiNamespaceName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ApiNamespaceName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ApiNamespaceName FromProjectLocationApiNamespace(string projectId, string locationId, string apiNamespaceId) => + new ApiNamespaceName(ResourceNameType.ProjectLocationApiNamespace, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}. + /// + public static string Format(string projectId, string locationId, string apiNamespaceId) => + FormatProjectLocationApiNamespace(projectId, locationId, apiNamespaceId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace}. + /// + public static string FormatProjectLocationApiNamespace(string projectId, string locationId, string apiNamespaceId) => + s_projectLocationApiNamespace.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ApiNamespaceName Parse(string apiNamespaceName) => Parse(apiNamespaceName, false); + + /// + /// Parses the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static ApiNamespaceName Parse(string apiNamespaceName, bool allowUnparsed) => + TryParse(apiNamespaceName, allowUnparsed, out ApiNamespaceName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string apiNamespaceName, out ApiNamespaceName result) => + TryParse(apiNamespaceName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string apiNamespaceName, bool allowUnparsed, out ApiNamespaceName result) + { + gax::GaxPreconditions.CheckNotNull(apiNamespaceName, nameof(apiNamespaceName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationApiNamespace.TryParseName(apiNamespaceName, out resourceName)) + { + result = FromProjectLocationApiNamespace(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(apiNamespaceName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ApiNamespaceName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string apiNamespaceId = null, string locationId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + ApiNamespaceId = apiNamespaceId; + LocationId = locationId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/apiNamespaces/{api_namespace} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The ApiNamespace ID. Must not be null or empty. + public ApiNamespaceName(string projectId, string locationId, string apiNamespaceId) : this(ResourceNameType.ProjectLocationApiNamespace, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), apiNamespaceId: gax::GaxPreconditions.CheckNotNullOrEmpty(apiNamespaceId, nameof(apiNamespaceId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The ApiNamespace ID. Will not be null, unless this instance contains an unparsed resource + /// name. + /// + public string ApiNamespaceId { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationApiNamespace: return s_projectLocationApiNamespace.Expand(ProjectId, LocationId, ApiNamespaceId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as ApiNamespaceName); + + /// + public bool Equals(ApiNamespaceName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(ApiNamespaceName a, ApiNamespaceName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(ApiNamespaceName a, ApiNamespaceName b) => !(a == b); + } + + public partial class GetMcpServerRequest + { + /// + /// -typed view over the resource name property. + /// + public gcav::McpServerName McpServerName + { + get => string.IsNullOrEmpty(Name) ? null : gcav::McpServerName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListMcpServersRequest + { + /// + /// -typed view over the resource name property. + /// + public gagr::LocationName ParentAsLocationName + { + get => string.IsNullOrEmpty(Parent) ? null : gagr::LocationName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } + + public partial class GetMcpToolRequest + { + /// + /// -typed view over the resource name property. + /// + public gcav::McpToolName McpToolName + { + get => string.IsNullOrEmpty(Name) ? null : gcav::McpToolName.Parse(Name, allowUnparsed: true); + set => Name = value?.ToString() ?? ""; + } + } + + public partial class ListMcpToolsRequest + { + /// + /// -typed view over the resource name property. + /// + public McpServerName ParentAsMcpServerName + { + get => string.IsNullOrEmpty(Parent) ? null : McpServerName.Parse(Parent, allowUnparsed: true); + set => Parent = value?.ToString() ?? ""; + } + } +} diff --git a/apis/Google.Cloud.ApiRegistry.V1Beta/gapic_metadata.json b/apis/Google.Cloud.ApiRegistry.V1Beta/gapic_metadata.json new file mode 100644 index 000000000000..26c90fa1a560 --- /dev/null +++ b/apis/Google.Cloud.ApiRegistry.V1Beta/gapic_metadata.json @@ -0,0 +1,42 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "csharp", + "protoPackage": "google.cloud.apiregistry.v1beta", + "libraryPackage": "Google.Cloud.ApiRegistry.V1Beta", + "services": { + "CloudApiRegistry": { + "clients": { + "grpc": { + "libraryClient": "CloudApiRegistryClient", + "rpcs": { + "GetMcpServer": { + "methods": [ + "GetMcpServer", + "GetMcpServerAsync" + ] + }, + "GetMcpTool": { + "methods": [ + "GetMcpTool", + "GetMcpToolAsync" + ] + }, + "ListMcpServers": { + "methods": [ + "ListMcpServers", + "ListMcpServersAsync" + ] + }, + "ListMcpTools": { + "methods": [ + "ListMcpTools", + "ListMcpToolsAsync" + ] + } + } + } + } + } + } +} diff --git a/generator-input/pipeline-state.json b/generator-input/pipeline-state.json index 4de9b82c87d5..9239ab9725ca 100644 --- a/generator-input/pipeline-state.json +++ b/generator-input/pipeline-state.json @@ -4799,6 +4799,7 @@ "nextVersion": "1.0.0-beta01", "generationAutomationLevel": "AUTOMATION_LEVEL_AUTOMATIC", "releaseAutomationLevel": "AUTOMATION_LEVEL_BLOCKED", + "lastGeneratedCommit": "ef6a532bfd9ab7a944bdedd64c69a2b4042db58b", "apiPaths": [ "google/cloud/apiregistry/v1beta" ],