Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/communication/azure-communication-jobrouter/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "952ffd9739be86e9c82c309f12c5c4449b126ca4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/communication/Communication.JobRouter",
"@azure-tools/typespec-python": "0.15.13"
}
Original file line number Diff line number Diff line change
Expand Up @@ -1383,8 +1383,6 @@ def delete_distribution_policy( # pylint: disable=inconsistent-return-statement

:param distribution_policy_id: The unique identifier of the policy. Required.
:type distribution_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -1823,8 +1821,6 @@ def delete_classification_policy( # pylint: disable=inconsistent-return-stateme

:param classification_policy_id: Unique identifier of this policy. Required.
:type classification_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -2262,8 +2258,6 @@ def delete_exception_policy( # pylint: disable=inconsistent-return-statements

:param exception_policy_id: The Id of the exception policy. Required.
:type exception_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -2699,8 +2693,6 @@ def delete_queue(self, queue_id: str, **kwargs: Any) -> None: # pylint: disable

:param queue_id: The Id of this queue. Required.
:type queue_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -3050,8 +3042,6 @@ def delete_job(self, job_id: str, **kwargs: Any) -> None: # pylint: disable=inc

:param job_id: The id of the job. Required.
:type job_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -4489,8 +4479,6 @@ def delete_worker(self, worker_id: str, **kwargs: Any) -> None: # pylint: disab

:param worker_id: Id of the worker. Required.
:type worker_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ async def delete_distribution_policy( # pylint: disable=inconsistent-return-sta

:param distribution_policy_id: The unique identifier of the policy. Required.
:type distribution_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -917,8 +915,6 @@ async def delete_classification_policy( # pylint: disable=inconsistent-return-s

:param classification_policy_id: Unique identifier of this policy. Required.
:type classification_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -1357,8 +1353,6 @@ async def delete_exception_policy( # pylint: disable=inconsistent-return-statem

:param exception_policy_id: The Id of the exception policy. Required.
:type exception_policy_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -1797,8 +1791,6 @@ async def delete_queue( # pylint: disable=inconsistent-return-statements

:param queue_id: The Id of this queue. Required.
:type queue_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -2148,8 +2140,6 @@ async def delete_job(self, job_id: str, **kwargs: Any) -> None: # pylint: disab

:param job_id: The id of the job. Required.
:type job_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down Expand Up @@ -3590,8 +3580,6 @@ async def delete_worker( # pylint: disable=inconsistent-return-statements

:param worker_id: Id of the worker. Required.
:type worker_id: str
:keyword bool stream: Whether to stream the response of this operation. Defaults to False. You
will have to context manage the returned stream.
:return: None
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,21 @@
from ._models import WorkerSelectorAttachment
from ._models import WorkerWeightedAllocation

from ._enums import DistributionModeKind
from ._enums import ExceptionActionKind
from ._enums import ExceptionTriggerKind
from ._enums import ExpressionRouterRuleLanguage
from ._enums import JobMatchingModeKind
from ._enums import LabelOperator
from ._enums import QueueSelectorAttachmentKind
from ._enums import RouterJobStatus
from ._enums import RouterJobStatusSelector
from ._enums import RouterRuleKind
from ._enums import RouterWorkerSelectorStatus
from ._enums import RouterWorkerState
from ._enums import RouterWorkerStateSelector
from ._enums import ScoringRuleParameterSelector
from ._enums import WorkerSelectorAttachmentKind
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
Expand Down Expand Up @@ -142,14 +149,21 @@
"WeightedAllocationWorkerSelectorAttachment",
"WorkerSelectorAttachment",
"WorkerWeightedAllocation",
"DistributionModeKind",
"ExceptionActionKind",
"ExceptionTriggerKind",
"ExpressionRouterRuleLanguage",
"JobMatchingModeKind",
"LabelOperator",
"QueueSelectorAttachmentKind",
"RouterJobStatus",
"RouterJobStatusSelector",
"RouterRuleKind",
"RouterWorkerSelectorStatus",
"RouterWorkerState",
"RouterWorkerStateSelector",
"ScoringRuleParameterSelector",
"WorkerSelectorAttachmentKind",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,55 @@
from azure.core import CaseInsensitiveEnumMeta


class DistributionModeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported distribution mode types."""

BEST_WORKER = "bestWorker"
"""Discriminator value for BestWorkerMode."""
LONGEST_IDLE = "longestIdle"
"""Discriminator value for LongestIdleMode."""
ROUND_ROBIN = "roundRobin"
"""Discriminator value for RoundRobinMode."""


class ExceptionActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported exception action types."""

CANCEL = "cancel"
"""Discriminator value for CancelExceptionAction."""
MANUAL_RECLASSIFY = "manualReclassify"
"""Discriminator value for ManualReclassifyExceptionAction."""
RECLASSIFY = "reclassify"
"""Discriminator value for ReclassifyExceptionAction."""


class ExceptionTriggerKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported exception trigger types."""

QUEUE_LENGTH = "queueLength"
"""Discriminator value for QueueLengthExceptionTrigger."""
WAIT_TIME = "waitTime"
"""Discriminator value for WaitTimeExceptionTrigger."""


class ExpressionRouterRuleLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The available expression languages that can be configured."""

POWER_FX = "powerFx"
"""PowerFx"""


class JobMatchingModeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported matching mode types."""

QUEUE_AND_MATCH = "queueAndMatch"
"""Discriminator value for QueueAndMatchMode."""
SCHEDULE_AND_SUSPEND = "scheduleAndSuspend"
"""Discriminator value for ScheduleAndSuspendMode."""
SUSPEND = "suspend"
"""Discriminator value for SuspendMode."""


class LabelOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Describes supported operations on label values."""

Expand All @@ -34,6 +76,21 @@ class LabelOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Greater than or equal"""


class QueueSelectorAttachmentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported queue selector attachment types."""

CONDITIONAL = "conditional"
"""Discriminator value for ConditionalQueueSelectorAttachment."""
PASS_THROUGH = "passThrough"
"""Discriminator value for PassThroughQueueSelectorAttachment."""
RULE_ENGINE = "ruleEngine"
"""Discriminator value for RuleEngineQueueSelectorAttachment."""
STATIC = "static"
"""Discriminator value for StaticQueueSelectorAttachment."""
WEIGHTED_ALLOCATION = "weightedAllocation"
"""Discriminator value for WeightedAllocationQueueSelectorAttachment."""


class RouterJobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the Job."""

Expand Down Expand Up @@ -97,6 +154,21 @@ class RouterJobStatusSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta):
#: Completed or PendingSchedule or Scheduled or ScheduleFailed or WaitingForActivation."""


class RouterRuleKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported router rule types."""

DIRECT_MAP = "directMap"
"""Discriminator value for DirectMapRouterRule."""
EXPRESSION = "expression"
"""Discriminator value for ExpressionRouterRule."""
FUNCTION = "function"
"""Discriminator value for FunctionRouterRule."""
STATIC = "static"
"""Discriminator value for StaticRouterRule."""
WEBHOOK = "webhook"
"""Discriminator value for WebhookRouterRule."""


class RouterWorkerSelectorStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The status of the worker selector."""

Expand Down Expand Up @@ -140,3 +212,18 @@ class ScoringRuleParameterSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta)
WORKER_SELECTORS = "workerSelectors"
"""Parameter to add worker selectors from the job to scoring payload. Property is sent as
#: ``selectors``."""


class WorkerSelectorAttachmentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Supported worker selector attachment types."""

CONDITIONAL = "conditional"
"""Discriminator value for ConditionalWorkerSelectorAttachment."""
PASS_THROUGH = "passThrough"
"""Discriminator value for PassThroughWorkerSelectorAttachment."""
RULE_ENGINE = "ruleEngine"
"""Discriminator value for RuleEngineWorkerSelectorAttachment."""
STATIC = "static"
"""Discriminator value for StaticWorkerSelectorAttachment."""
WEIGHTED_ALLOCATION = "weightedAllocation"
"""Discriminator value for WeightedAllocationWorkerSelectorAttachment."""
Loading