"""Generated client library for cloudapiregistry version v1beta."""
# NOTE: This file is autogenerated and should not be edited by hand.

from apitools.base.py import base_api
from googlecloudsdk.generated_clients.apis.cloudapiregistry.v1beta import cloudapiregistry_v1beta_messages as messages


class CloudapiregistryV1beta(base_api.BaseApiClient):
  """Generated client library for service cloudapiregistry version v1beta."""

  MESSAGES_MODULE = messages
  BASE_URL = 'https://cloudapiregistry.googleapis.com/'
  MTLS_BASE_URL = 'https://cloudapiregistry.mtls.googleapis.com/'

  _PACKAGE = 'cloudapiregistry'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-platform']
  _VERSION = 'v1beta'
  _CLIENT_ID = 'CLIENT_ID'
  _CLIENT_SECRET = 'CLIENT_SECRET'
  _USER_AGENT = 'google-cloud-sdk'
  _CLIENT_CLASS_NAME = 'CloudapiregistryV1beta'
  _URL_VERSION = 'v1beta'
  _API_KEY = None

  def __init__(self, url='', credentials=None,
               get_credentials=True, http=None, model=None,
               log_request=False, log_response=False,
               credentials_args=None, default_global_params=None,
               additional_http_headers=None, response_encoding=None):
    """Create a new cloudapiregistry handle."""
    url = url or self.BASE_URL
    super(CloudapiregistryV1beta, self).__init__(
        url, credentials=credentials,
        get_credentials=get_credentials, http=http, model=model,
        log_request=log_request, log_response=log_response,
        credentials_args=credentials_args,
        default_global_params=default_global_params,
        additional_http_headers=additional_http_headers,
        response_encoding=response_encoding)
    self.projects_locations_mcpServers_mcpTools = self.ProjectsLocationsMcpServersMcpToolsService(self)
    self.projects_locations_mcpServers = self.ProjectsLocationsMcpServersService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects = self.ProjectsService(self)

  class ProjectsLocationsMcpServersMcpToolsService(base_api.BaseApiService):
    """Service class for the projects_locations_mcpServers_mcpTools resource."""

    _NAME = 'projects_locations_mcpServers_mcpTools'

    def __init__(self, client):
      super(CloudapiregistryV1beta.ProjectsLocationsMcpServersMcpToolsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Deprecated: The GetMcpTool method is deprecated and will be removed in a future release. For similar functionality, you can use Agent Registry. Note: Agent Registry does not treat tools as a separate collection. To view the tools exposed by an MCP server, use the ListMcpServers or GetMcpServer methods in the Agent Registry API. For more information, see: https://docs.cloud.google.com/agent-registry/reference/rpc Gets a single McpTool.

      Args:
        request: (CloudapiregistryProjectsLocationsMcpServersMcpToolsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (McpTool) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations/{locationsId}/mcpServers/{mcpServersId}/mcpTools/{mcpToolsId}',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.mcpServers.mcpTools.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1beta/{+name}',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsMcpServersMcpToolsGetRequest',
        response_type_name='McpTool',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Deprecated: The ListMcpTools method is deprecated and will be removed in a future release. For similar functionality, you can use Agent Registry. Note: AgentRegistry only lists MCP servers for service APIs that are enabled in a project. For more information, see: https://docs.cloud.google.com/agent-registry/reference/rpc Lists McpTools in a given McpServer.

      Args:
        request: (CloudapiregistryProjectsLocationsMcpServersMcpToolsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListMcpToolsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations/{locationsId}/mcpServers/{mcpServersId}/mcpTools',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.mcpServers.mcpTools.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1beta/{+parent}/mcpTools',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsMcpServersMcpToolsListRequest',
        response_type_name='ListMcpToolsResponse',
        supports_download=False,
    )

  class ProjectsLocationsMcpServersService(base_api.BaseApiService):
    """Service class for the projects_locations_mcpServers resource."""

    _NAME = 'projects_locations_mcpServers'

    def __init__(self, client):
      super(CloudapiregistryV1beta.ProjectsLocationsMcpServersService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Deprecated: The GetMcpServer method is deprecated and will be removed in a future release. Use AgentRegistry.GetMcpServer instead. For more information, see: https://docs.cloud.google.com/agent-registry/reference/rpc Gets a single McpServer.

      Args:
        request: (CloudapiregistryProjectsLocationsMcpServersGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (McpServer) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations/{locationsId}/mcpServers/{mcpServersId}',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.mcpServers.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1beta/{+name}',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsMcpServersGetRequest',
        response_type_name='McpServer',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Deprecated: The ListMcpServers method is deprecated and will be removed in a future release. Use AgentRegistry. ListMcpServers instead. Note: AgentRegistry only lists MCP servers for service APIs that are enabled in a project. For more information, see: https://docs.cloud.google.com/agent-registry/reference/rpc Lists McpServers in a given Project.

      Args:
        request: (CloudapiregistryProjectsLocationsMcpServersListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListMcpServersResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations/{locationsId}/mcpServers',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.mcpServers.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1beta/{+parent}/mcpServers',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsMcpServersListRequest',
        response_type_name='ListMcpServersResponse',
        supports_download=False,
    )

  class ProjectsLocationsService(base_api.BaseApiService):
    """Service class for the projects_locations resource."""

    _NAME = 'projects_locations'

    def __init__(self, client):
      super(CloudapiregistryV1beta.ProjectsLocationsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets information about a location.

      Args:
        request: (CloudapiregistryProjectsLocationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Location) The response message.
      """
      config = self.GetMethodConfig('Get')
      return self._RunMethod(
          config, request, global_params=global_params)

    Get.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations/{locationsId}',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1beta/{+name}',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsGetRequest',
        response_type_name='Location',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * **Global locations**: If `name` is empty, the method lists the public locations available to all projects. * **Project-specific locations**: If `name` follows the format `projects/{project}`, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the `name` field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.

      Args:
        request: (CloudapiregistryProjectsLocationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListLocationsResponse) The response message.
      """
      config = self.GetMethodConfig('List')
      return self._RunMethod(
          config, request, global_params=global_params)

    List.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1beta/projects/{projectsId}/locations',
        http_method='GET',
        method_id='cloudapiregistry.projects.locations.list',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['extraLocationTypes', 'filter', 'pageSize', 'pageToken'],
        relative_path='v1beta/{+name}/locations',
        request_field='',
        request_type_name='CloudapiregistryProjectsLocationsListRequest',
        response_type_name='ListLocationsResponse',
        supports_download=False,
    )

  class ProjectsService(base_api.BaseApiService):
    """Service class for the projects resource."""

    _NAME = 'projects'

    def __init__(self, client):
      super(CloudapiregistryV1beta.ProjectsService, self).__init__(client)
      self._upload_configs = {
          }
