class_docstr: Specifies options for one deployment within a Serve application. For each deployment
  this can optionally be included in `ServeApplicationSchema` to override deployment
  options specified in code.
class_docstr_tok: ["Specifies","options","for","one","deployment","within","a","Serve","application",".","For","each","deployment","this","can","optionally","be","included","in","`","ServeApplicationSchema","`","to","override","deployment","options","specified","in","code","."]
code: def num_replicas_and_autoscaling_config_mutually_exclusive(
      cls, values
  ):
      if values.get("num_replicas", None) not in [
          DEFAULT.VALUE,
          None,
      ] and values.get("autoscaling_config", None) not in [
          DEFAULT.VALUE,
          None,
      ]:
          raise ValueError(
              "Manually setting num_replicas is not allowed "
              "when autoscaling_config is provided."
          )
  
      return values
  
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 1 for calling the DeploymentSchema obj's underlying member method code with example usage: obj.num_replicas_and_autoscaling_config_mutually_exclusive(cls, values) and returns: values