class_docstr: Serve metadata with system-level info and details on all applications deployed to
  the Ray cluster.
  
  This is the response JSON schema for v2 REST API `GET /api/serve/applications`.
class_docstr_tok: ["Serve","metadata","with","system-level","info","and","details","on","all","applications","deployed","to","the","Ray","cluster",".","This","is","the","response","JSON","schema","for","v2","REST","API","`","GET","\/api\/serve\/applications","`","."]
code: def _get_status(self) -> ServeStatus:
      return ServeStatus(
          target_capacity=self.target_capacity,
          proxies={
              node_id: proxy.status
              for node_id, proxy in self.proxies.items()
          },
          applications={
              app_name: ApplicationStatusOverview(
                  status=app.status,
                  message=app.message,
                  last_deployed_time_s=app.last_deployed_time_s,
                  deployments={
                      deployment_name: DeploymentStatusOverview(
                          status=deployment.status,
                          status_trigger=deployment.status_trigger,
                          replica_states=dict(
                              Counter(
                                  [
                                      r.state.value
                                      for r in deployment.replicas
                                  ]
                              )
                          ),
                          message=deployment.message,
                      )
                      for deployment_name, deployment in app.deployments.items()
                  },
              )
              for app_name, app in self.applications.items()
          },
      )
  
imports: import logging
  from collections import Counter
  from dataclasses import dataclass, field
  from enum import Enum
  from typing import Any, Dict, List, Optional, Set, Union
  from zlib import crc32
  from ray._private.pydantic_compat import BaseModel, Extra, Field, root_validator, validator
  from ray._private.runtime_env.packaging import parse_uri
  from ray.serve._private.common import ApplicationStatus, DeploymentStatus, DeploymentStatusTrigger, ProxyStatus, ReplicaState, ServeDeployMode
  from ray.serve._private.constants import DEFAULT_GRPC_PORT, DEFAULT_UVICORN_KEEP_ALIVE_TIMEOUT_S, SERVE_DEFAULT_APP_NAME
  from ray.serve._private.deployment_info import DeploymentInfo
  from ray.serve._private.utils import DEFAULT
  from ray.serve.config import ProxyLocation
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 2 for calling the ServeInstanceDetails obj's underlying member method code with example usage: obj._get_status() and returns: ServeStatus