From 901d3cc791fb5e6e78fe695ab868867aa2449fe9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 14 Nov 2023 17:32:18 +0000 Subject: [PATCH] CodeGen from PR 26695 in Azure/azure-rest-api-specs Merge 118b5cc953c338ba64549dbbfc64d8f280ff0697 into 90a65cb3135d42438a381eb8bb5461a2b99b199f --- .../azure-communication-jobrouter/_meta.json | 6 + .../azure/communication/jobrouter/__init__.py | 4 +- .../azure/communication/jobrouter/_client.py | 4 +- .../communication/jobrouter/_configuration.py | 4 +- .../jobrouter/_operations/__init__.py | 4 +- .../jobrouter/_operations/_operations.py | 138 ++++---- .../communication/jobrouter/aio/__init__.py | 4 +- .../communication/jobrouter/aio/_client.py | 4 +- .../jobrouter/aio/_configuration.py | 4 +- .../jobrouter/aio/_operations/__init__.py | 4 +- .../jobrouter/aio/_operations/_operations.py | 138 ++++---- .../communication/jobrouter/models/_enums.py | 44 +-- .../communication/jobrouter/models/_models.py | 311 +++++++++--------- .../tsp-location.yaml | 2 +- 14 files changed, 334 insertions(+), 337 deletions(-) create mode 100644 sdk/communication/azure-communication-jobrouter/_meta.json diff --git a/sdk/communication/azure-communication-jobrouter/_meta.json b/sdk/communication/azure-communication-jobrouter/_meta.json new file mode 100644 index 000000000000..de52bafc8490 --- /dev/null +++ b/sdk/communication/azure-communication-jobrouter/_meta.json @@ -0,0 +1,6 @@ +{ + "commit": "fae971a688cb023c19708a7551da18ea22dff5d5", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "typespec_src": "specification/communication/Communication.JobRouter", + "@azure-tools/typespec-python": "0.15.13" +} \ No newline at end of file diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/__init__.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/__init__.py index ba2b07fc1b38..30a55b8c5a1c 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/__init__.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._patch import JobRouterAdministrationClient -from ._patch import JobRouterClient +from ._client import JobRouterAdministrationClient +from ._client import JobRouterClient from ._version import VERSION __version__ = VERSION diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_client.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_client.py index 76c199b42472..ad6f17f9f863 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_client.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_client.py @@ -23,7 +23,7 @@ class JobRouterAdministrationClient( ): # pylint: disable=client-accepts-api-version-keyword """JobRouterAdministrationClient. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. @@ -98,7 +98,7 @@ def __exit__(self, *exc_details: Any) -> None: class JobRouterClient(JobRouterClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """JobRouterClient. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_configuration.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_configuration.py index 153b3ab91513..bb7bf7ce4aa2 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_configuration.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_configuration.py @@ -19,7 +19,7 @@ class JobRouterAdministrationClientConfiguration: # pylint: disable=too-many-in Note that all parameters used to create this instance are saved as instance attributes. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. @@ -56,7 +56,7 @@ class JobRouterClientConfiguration: # pylint: disable=too-many-instance-attribu Note that all parameters used to create this instance are saved as instance attributes. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/__init__.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/__init__.py index 06eb1614ceb7..716a8d30dd24 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/__init__.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._patch import JobRouterAdministrationClientOperationsMixin -from ._patch import JobRouterClientOperationsMixin +from ._operations import JobRouterAdministrationClientOperationsMixin +from ._operations import JobRouterClientOperationsMixin from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_operations.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_operations.py index a5c1e1353523..520bb805b26b 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_operations.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/_operations/_operations.py @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core import MatchConditions @@ -1006,7 +1006,7 @@ def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.DistributionPolicy @@ -1044,7 +1044,7 @@ def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1082,7 +1082,7 @@ def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1119,7 +1119,7 @@ def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Is one of the following types: DistributionPolicy, JSON, IO Required. @@ -1226,7 +1226,7 @@ def get_distribution_policy(self, distribution_policy_id: str, **kwargs: Any) -> Retrieves an existing distribution policy by Id. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution 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. @@ -1286,7 +1286,7 @@ def get_distribution_policy(self, distribution_policy_id: str, **kwargs: Any) -> return deserialized # type: ignore @distributed_trace - def list_distribution_policies(self, **kwargs: Any) -> ItemPaged["_models.DistributionPolicy"]: + def list_distribution_policies(self, **kwargs: Any) -> Iterable["_models.DistributionPolicy"]: """Retrieves existing distribution policies. Retrieves existing distribution policies. @@ -1381,7 +1381,7 @@ def delete_distribution_policy( # pylint: disable=inconsistent-return-statement Delete a distribution policy by Id. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :return: None :rtype: None @@ -1443,7 +1443,7 @@ def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.ClassificationPolicy @@ -1481,7 +1481,7 @@ def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1519,7 +1519,7 @@ def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1556,7 +1556,7 @@ def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Is one of the following types: ClassificationPolicy, JSON, IO Required. @@ -1663,7 +1663,7 @@ def get_classification_policy(self, classification_policy_id: str, **kwargs: Any Retrieves an existing classification policy by Id. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification 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. @@ -1723,7 +1723,7 @@ def get_classification_policy(self, classification_policy_id: str, **kwargs: Any return deserialized # type: ignore @distributed_trace - def list_classification_policies(self, **kwargs: Any) -> ItemPaged["_models.ClassificationPolicy"]: + def list_classification_policies(self, **kwargs: Any) -> Iterable["_models.ClassificationPolicy"]: """Retrieves existing classification policies. Retrieves existing classification policies. @@ -1819,7 +1819,7 @@ def delete_classification_policy( # pylint: disable=inconsistent-return-stateme Delete a classification policy by Id. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :return: None :rtype: None @@ -1881,7 +1881,7 @@ def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.ExceptionPolicy @@ -1919,7 +1919,7 @@ def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1957,7 +1957,7 @@ def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1994,7 +1994,7 @@ def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Is one of the following types: ExceptionPolicy, JSON, IO Required. @@ -2101,7 +2101,7 @@ def get_exception_policy(self, exception_policy_id: str, **kwargs: Any) -> _mode Retrieves an existing exception policy by Id. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an 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. @@ -2161,7 +2161,7 @@ def get_exception_policy(self, exception_policy_id: str, **kwargs: Any) -> _mode return deserialized # type: ignore @distributed_trace - def list_exception_policies(self, **kwargs: Any) -> ItemPaged["_models.ExceptionPolicy"]: + def list_exception_policies(self, **kwargs: Any) -> Iterable["_models.ExceptionPolicy"]: """Retrieves existing exception policies. Retrieves existing exception policies. @@ -2256,7 +2256,7 @@ def delete_exception_policy( # pylint: disable=inconsistent-return-statements Deletes a exception policy by Id. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :return: None :rtype: None @@ -2318,7 +2318,7 @@ def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterQueue @@ -2356,7 +2356,7 @@ def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -2394,7 +2394,7 @@ def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: IO @@ -2431,7 +2431,7 @@ def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Is one of the following types: RouterQueue, JSON, IO Required. @@ -2538,7 +2538,7 @@ def get_queue(self, queue_id: str, **kwargs: Any) -> _models.RouterQueue: Retrieves an existing queue by Id. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a 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. @@ -2598,7 +2598,7 @@ def get_queue(self, queue_id: str, **kwargs: Any) -> _models.RouterQueue: return deserialized # type: ignore @distributed_trace - def list_queues(self, **kwargs: Any) -> ItemPaged["_models.RouterQueue"]: + def list_queues(self, **kwargs: Any) -> Iterable["_models.RouterQueue"]: """Retrieves existing queues. Retrieves existing queues. @@ -2691,7 +2691,7 @@ def delete_queue(self, queue_id: str, **kwargs: Any) -> None: # pylint: disable Deletes a queue by Id. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :return: None :rtype: None @@ -2755,7 +2755,7 @@ def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterJob @@ -2793,7 +2793,7 @@ def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -2831,7 +2831,7 @@ def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: IO @@ -2868,7 +2868,7 @@ def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Is one of the following types: RouterJob, JSON, IO Required. @@ -2975,7 +2975,7 @@ def get_job(self, job_id: str, **kwargs: Any) -> _models.RouterJob: Retrieves an existing job by Id. - :param job_id: The id of the job. Required. + :param job_id: Id of a 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. @@ -3040,7 +3040,7 @@ def delete_job(self, job_id: str, **kwargs: Any) -> None: # pylint: disable=inc Deletes a job and all of its traces. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :return: None :rtype: None @@ -3120,7 +3120,7 @@ def _reclassify_job( # pylint: disable=protected-access Reclassify a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param options: Request object for reclassifying a job. Is one of the following types: ReclassifyJobOptions, JSON, IO Default value is None. @@ -3227,7 +3227,7 @@ def _cancel_job( # pylint: disable=protected-access Submits request to cancel an existing job by Id while supplying free-form cancellation reason. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param options: Request model for cancelling job. Is one of the following types: CancelJobOptions, JSON, IO Default value is None. @@ -3351,9 +3351,9 @@ def _complete_job( # pylint: disable=protected-access Completes an assigned job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request model for completing job. Is one of the following types: CompleteJobOptions, JSON, IO Default value is None. @@ -3478,9 +3478,9 @@ def _close_job( # pylint: disable=protected-access Closes a completed job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request model for closing job. Is one of the following types: CloseJobOptions, JSON, IO Default value is None. @@ -3568,7 +3568,7 @@ def list_jobs( scheduled_before: Optional[datetime.datetime] = None, scheduled_after: Optional[datetime.datetime] = None, **kwargs: Any - ) -> ItemPaged["_models.RouterJob"]: + ) -> Iterable["_models.RouterJob"]: """Retrieves list of jobs based on filter parameters. Retrieves list of jobs based on filter parameters. @@ -3751,13 +3751,13 @@ def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: ~azure.communication.jobrouter.models.UnassignJobOptions @@ -3781,13 +3781,13 @@ def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: JSON @@ -3811,13 +3811,13 @@ def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: IO @@ -3839,13 +3839,13 @@ def unassign_job( options: Optional[Union[_models.UnassignJobOptions, JSON, IO]] = None, **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Is one of the following types: UnassignJobOptions, JSON, IO Default value is None. @@ -3928,9 +3928,9 @@ def accept_job_offer(self, worker_id: str, offer_id: str, **kwargs: Any) -> _mod Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str - :param offer_id: The Id of the offer. Required. + :param offer_id: Id of an offer. Required. :type offer_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. @@ -4034,9 +4034,9 @@ def _decline_job_offer( # pylint: disable=protected-access Declines an offer to work on a job. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str - :param offer_id: The Id of the offer. Required. + :param offer_id: Id of an offer. Required. :type offer_id: str :param options: Request model for declining offer. Is one of the following types: DeclineJobOfferOptions, JSON, IO Default value is None. @@ -4192,7 +4192,7 @@ def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterWorker @@ -4230,7 +4230,7 @@ def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -4268,7 +4268,7 @@ def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: IO @@ -4305,7 +4305,7 @@ def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Is one of the following types: RouterWorker, JSON, IO Required. @@ -4412,7 +4412,7 @@ def get_worker(self, worker_id: str, **kwargs: Any) -> _models.RouterWorker: Retrieves an existing worker by Id. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a 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. @@ -4477,7 +4477,7 @@ def delete_worker(self, worker_id: str, **kwargs: Any) -> None: # pylint: disab Deletes a worker and all of its traces. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :return: None :rtype: None @@ -4532,7 +4532,7 @@ def list_workers( queue_id: Optional[str] = None, has_capacity: Optional[bool] = None, **kwargs: Any - ) -> ItemPaged["_models.RouterWorker"]: + ) -> Iterable["_models.RouterWorker"]: """Retrieves existing workers. Retrieves existing workers. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/__init__.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/__init__.py index 2cad3c9bd6b0..4a879c5b9463 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/__init__.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._patch import JobRouterAdministrationClient -from ._patch import JobRouterClient +from ._client import JobRouterAdministrationClient +from ._client import JobRouterClient try: from ._patch import __all__ as _patch_all diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_client.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_client.py index dd90c8bfc5be..9d9a25d2b0ce 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_client.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_client.py @@ -23,7 +23,7 @@ class JobRouterAdministrationClient( ): # pylint: disable=client-accepts-api-version-keyword """JobRouterAdministrationClient. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. @@ -100,7 +100,7 @@ async def __aexit__(self, *exc_details: Any) -> None: class JobRouterClient(JobRouterClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword """JobRouterClient. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_configuration.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_configuration.py index b705c0167ccf..30c36dad559e 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_configuration.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_configuration.py @@ -19,7 +19,7 @@ class JobRouterAdministrationClientConfiguration: # pylint: disable=too-many-in Note that all parameters used to create this instance are saved as instance attributes. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. @@ -56,7 +56,7 @@ class JobRouterClientConfiguration: # pylint: disable=too-many-instance-attribu Note that all parameters used to create this instance are saved as instance attributes. - :param endpoint: Required. + :param endpoint: Uri of your Communication resource. Required. :type endpoint: str :keyword api_version: The API version to use for this operation. Default value is "2023-11-01". Note that overriding this default value may result in unsupported behavior. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/__init__.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/__init__.py index 06eb1614ceb7..716a8d30dd24 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/__init__.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._patch import JobRouterAdministrationClientOperationsMixin -from ._patch import JobRouterClientOperationsMixin +from ._operations import JobRouterAdministrationClientOperationsMixin +from ._operations import JobRouterClientOperationsMixin from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_operations.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_operations.py index 4858451c8e07..ad80c40fbfd6 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_operations.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/aio/_operations/_operations.py @@ -10,7 +10,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core import MatchConditions @@ -97,7 +97,7 @@ async def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.DistributionPolicy @@ -135,7 +135,7 @@ async def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -173,7 +173,7 @@ async def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -210,7 +210,7 @@ async def upsert_distribution_policy( Creates or updates a distribution policy. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :param resource: The resource instance. Is one of the following types: DistributionPolicy, JSON, IO Required. @@ -317,7 +317,7 @@ async def get_distribution_policy(self, distribution_policy_id: str, **kwargs: A Retrieves an existing distribution policy by Id. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution 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. @@ -377,7 +377,7 @@ async def get_distribution_policy(self, distribution_policy_id: str, **kwargs: A return deserialized # type: ignore @distributed_trace - def list_distribution_policies(self, **kwargs: Any) -> AsyncItemPaged["_models.DistributionPolicy"]: + def list_distribution_policies(self, **kwargs: Any) -> AsyncIterable["_models.DistributionPolicy"]: """Retrieves existing distribution policies. Retrieves existing distribution policies. @@ -473,7 +473,7 @@ async def delete_distribution_policy( # pylint: disable=inconsistent-return-sta Delete a distribution policy by Id. - :param distribution_policy_id: The unique identifier of the policy. Required. + :param distribution_policy_id: Id of a distribution policy. Required. :type distribution_policy_id: str :return: None :rtype: None @@ -535,7 +535,7 @@ async def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.ClassificationPolicy @@ -573,7 +573,7 @@ async def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -611,7 +611,7 @@ async def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -648,7 +648,7 @@ async def upsert_classification_policy( Creates or updates a classification policy. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :param resource: The resource instance. Is one of the following types: ClassificationPolicy, JSON, IO Required. @@ -757,7 +757,7 @@ async def get_classification_policy( Retrieves an existing classification policy by Id. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification 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. @@ -817,7 +817,7 @@ async def get_classification_policy( return deserialized # type: ignore @distributed_trace - def list_classification_policies(self, **kwargs: Any) -> AsyncItemPaged["_models.ClassificationPolicy"]: + def list_classification_policies(self, **kwargs: Any) -> AsyncIterable["_models.ClassificationPolicy"]: """Retrieves existing classification policies. Retrieves existing classification policies. @@ -913,7 +913,7 @@ async def delete_classification_policy( # pylint: disable=inconsistent-return-s Delete a classification policy by Id. - :param classification_policy_id: Unique identifier of this policy. Required. + :param classification_policy_id: Id of a classification policy. Required. :type classification_policy_id: str :return: None :rtype: None @@ -975,7 +975,7 @@ async def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.ExceptionPolicy @@ -1013,7 +1013,7 @@ async def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1051,7 +1051,7 @@ async def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1088,7 +1088,7 @@ async def upsert_exception_policy( Creates or updates a exception policy. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :param resource: The resource instance. Is one of the following types: ExceptionPolicy, JSON, IO Required. @@ -1195,7 +1195,7 @@ async def get_exception_policy(self, exception_policy_id: str, **kwargs: Any) -> Retrieves an existing exception policy by Id. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an 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. @@ -1255,7 +1255,7 @@ async def get_exception_policy(self, exception_policy_id: str, **kwargs: Any) -> return deserialized # type: ignore @distributed_trace - def list_exception_policies(self, **kwargs: Any) -> AsyncItemPaged["_models.ExceptionPolicy"]: + def list_exception_policies(self, **kwargs: Any) -> AsyncIterable["_models.ExceptionPolicy"]: """Retrieves existing exception policies. Retrieves existing exception policies. @@ -1351,7 +1351,7 @@ async def delete_exception_policy( # pylint: disable=inconsistent-return-statem Deletes a exception policy by Id. - :param exception_policy_id: The Id of the exception policy. Required. + :param exception_policy_id: Id of an exception policy. Required. :type exception_policy_id: str :return: None :rtype: None @@ -1413,7 +1413,7 @@ async def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterQueue @@ -1451,7 +1451,7 @@ async def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1489,7 +1489,7 @@ async def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1526,7 +1526,7 @@ async def upsert_queue( Creates or updates a queue. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :param resource: The resource instance. Is one of the following types: RouterQueue, JSON, IO Required. @@ -1633,7 +1633,7 @@ async def get_queue(self, queue_id: str, **kwargs: Any) -> _models.RouterQueue: Retrieves an existing queue by Id. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a 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. @@ -1693,7 +1693,7 @@ async def get_queue(self, queue_id: str, **kwargs: Any) -> _models.RouterQueue: return deserialized # type: ignore @distributed_trace - def list_queues(self, **kwargs: Any) -> AsyncItemPaged["_models.RouterQueue"]: + def list_queues(self, **kwargs: Any) -> AsyncIterable["_models.RouterQueue"]: """Retrieves existing queues. Retrieves existing queues. @@ -1789,7 +1789,7 @@ async def delete_queue( # pylint: disable=inconsistent-return-statements Deletes a queue by Id. - :param queue_id: The Id of this queue. Required. + :param queue_id: Id of a queue. Required. :type queue_id: str :return: None :rtype: None @@ -1853,7 +1853,7 @@ async def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterJob @@ -1891,7 +1891,7 @@ async def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -1929,7 +1929,7 @@ async def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Required. :type resource: IO @@ -1966,7 +1966,7 @@ async def upsert_job( Creates or updates a router job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param resource: The resource instance. Is one of the following types: RouterJob, JSON, IO Required. @@ -2073,7 +2073,7 @@ async def get_job(self, job_id: str, **kwargs: Any) -> _models.RouterJob: Retrieves an existing job by Id. - :param job_id: The id of the job. Required. + :param job_id: Id of a 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. @@ -2138,7 +2138,7 @@ async def delete_job(self, job_id: str, **kwargs: Any) -> None: # pylint: disab Deletes a job and all of its traces. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :return: None :rtype: None @@ -2218,7 +2218,7 @@ async def _reclassify_job( # pylint: disable=protected-access Reclassify a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param options: Request object for reclassifying a job. Is one of the following types: ReclassifyJobOptions, JSON, IO Default value is None. @@ -2325,7 +2325,7 @@ async def _cancel_job( # pylint: disable=protected-access Submits request to cancel an existing job by Id while supplying free-form cancellation reason. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str :param options: Request model for cancelling job. Is one of the following types: CancelJobOptions, JSON, IO Default value is None. @@ -2449,9 +2449,9 @@ async def _complete_job( # pylint: disable=protected-access Completes an assigned job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request model for completing job. Is one of the following types: CompleteJobOptions, JSON, IO Default value is None. @@ -2576,9 +2576,9 @@ async def _close_job( # pylint: disable=protected-access Closes a completed job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request model for closing job. Is one of the following types: CloseJobOptions, JSON, IO Default value is None. @@ -2666,7 +2666,7 @@ def list_jobs( scheduled_before: Optional[datetime.datetime] = None, scheduled_after: Optional[datetime.datetime] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.RouterJob"]: + ) -> AsyncIterable["_models.RouterJob"]: """Retrieves list of jobs based on filter parameters. Retrieves list of jobs based on filter parameters. @@ -2850,13 +2850,13 @@ async def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: ~azure.communication.jobrouter.models.UnassignJobOptions @@ -2880,13 +2880,13 @@ async def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: JSON @@ -2910,13 +2910,13 @@ async def unassign_job( content_type: str = "application/json", **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Default value is None. :type options: IO @@ -2938,13 +2938,13 @@ async def unassign_job( options: Optional[Union[_models.UnassignJobOptions, JSON, IO]] = None, **kwargs: Any ) -> _models.UnassignJobResult: - """Un-assign a job. + """Unassign a job. - Un-assign a job. + Unassign a job. - :param job_id: The id of the job. Required. + :param job_id: Id of a job. Required. :type job_id: str - :param assignment_id: The Id of the job assignment. Required. + :param assignment_id: Id of a job assignment. Required. :type assignment_id: str :param options: Request body for unassign route. Is one of the following types: UnassignJobOptions, JSON, IO Default value is None. @@ -3027,9 +3027,9 @@ async def accept_job_offer(self, worker_id: str, offer_id: str, **kwargs: Any) - Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str - :param offer_id: The Id of the offer. Required. + :param offer_id: Id of an offer. Required. :type offer_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. @@ -3133,9 +3133,9 @@ async def _decline_job_offer( # pylint: disable=protected-access Declines an offer to work on a job. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str - :param offer_id: The Id of the offer. Required. + :param offer_id: Id of an offer. Required. :type offer_id: str :param options: Request model for declining offer. Is one of the following types: DeclineJobOfferOptions, JSON, IO Default value is None. @@ -3291,7 +3291,7 @@ async def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: ~azure.communication.jobrouter.models.RouterWorker @@ -3329,7 +3329,7 @@ async def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: JSON @@ -3367,7 +3367,7 @@ async def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Required. :type resource: IO @@ -3404,7 +3404,7 @@ async def upsert_worker( Creates or updates a worker. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :param resource: The resource instance. Is one of the following types: RouterWorker, JSON, IO Required. @@ -3511,7 +3511,7 @@ async def get_worker(self, worker_id: str, **kwargs: Any) -> _models.RouterWorke Retrieves an existing worker by Id. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a 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. @@ -3578,7 +3578,7 @@ async def delete_worker( # pylint: disable=inconsistent-return-statements Deletes a worker and all of its traces. - :param worker_id: Id of the worker. Required. + :param worker_id: Id of a worker. Required. :type worker_id: str :return: None :rtype: None @@ -3633,7 +3633,7 @@ def list_workers( queue_id: Optional[str] = None, has_capacity: Optional[bool] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.RouterWorker"]: + ) -> AsyncIterable["_models.RouterWorker"]: """Retrieves existing workers. Retrieves existing workers. diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_enums.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_enums.py index 2c7c2f215152..48213ad16d18 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_enums.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_enums.py @@ -11,7 +11,7 @@ class DistributionModeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported distribution mode types.""" + """Discriminators for supported distribution mode types.""" BEST_WORKER = "bestWorker" """Discriminator value for BestWorkerMode.""" @@ -22,7 +22,7 @@ class DistributionModeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ExceptionActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported exception action types.""" + """Discriminators for supported exception action types.""" CANCEL = "cancel" """Discriminator value for CancelExceptionAction.""" @@ -33,7 +33,7 @@ class ExceptionActionKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ExceptionTriggerKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported exception trigger types.""" + """Discriminators for supported exception trigger types.""" QUEUE_LENGTH = "queueLength" """Discriminator value for QueueLengthExceptionTrigger.""" @@ -42,14 +42,14 @@ class ExceptionTriggerKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ExpressionRouterRuleLanguage(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The available expression languages that can be configured.""" + """Available expression languages that can be configured.""" POWER_FX = "powerFx" """PowerFx""" class JobMatchingModeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported matching mode types.""" + """Discriminators for supported matching mode types.""" QUEUE_AND_MATCH = "queueAndMatch" """Discriminator value for QueueAndMatchMode.""" @@ -63,21 +63,21 @@ class LabelOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes supported operations on label values.""" EQUAL = "equal" - """Equal""" + """Equal.""" NOT_EQUAL = "notEqual" - """Not Equal""" + """Not Equal.""" LESS_THAN = "lessThan" - """Less than""" + """Less than.""" LESS_THAN_OR_EQUAL = "lessThanOrEqual" - """Less than or equal""" + """Less than or equal.""" GREATER_THAN = "greaterThan" - """Greater than""" + """Greater than.""" GREATER_THAN_OR_EQUAL = "greaterThanOrEqual" - """Greater than or equal""" + """Greater than or equal.""" class QueueSelectorAttachmentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported queue selector attachment types.""" + """Discriminators for supported queue selector attachment types.""" CONDITIONAL = "conditional" """Discriminator value for ConditionalQueueSelectorAttachment.""" @@ -92,7 +92,7 @@ class QueueSelectorAttachmentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RouterJobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the Job.""" + """Describes the various status of a job.""" PENDING_CLASSIFICATION = "pendingClassification" """Job is waiting to be classified.""" @@ -121,7 +121,7 @@ class RouterJobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RouterJobStatusSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enums used to filters jobs by state.""" + """Enums used to filters jobs by status.""" ALL = "all" """Default""" @@ -155,7 +155,7 @@ class RouterJobStatusSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RouterRuleKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported router rule types.""" + """Discriminators for supported router rule types.""" DIRECT_MAP = "directMap" """Discriminator value for DirectMapRouterRule.""" @@ -170,16 +170,16 @@ class RouterRuleKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RouterWorkerSelectorStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The status of the worker selector.""" + """Describes the status of a worker selector.""" ACTIVE = "active" - """Active""" + """Worker selector is valid.""" EXPIRED = "expired" - """Expired""" + """Worker selector is not valid.""" class RouterWorkerState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enums for worker status.""" + """Enums for worker states.""" ACTIVE = "active" """Worker is active and available to take offers.""" @@ -205,17 +205,17 @@ class RouterWorkerStateSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ScoringRuleParameterSelector(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported parameters for scoring workers.""" + """Supported parameters for scoring workers used with BestWorkerMode.""" JOB_LABELS = "jobLabels" """Parameter to add job labels to scoring payload. Property is sent as ``job``.""" WORKER_SELECTORS = "workerSelectors" - """Parameter to add worker selectors from the job to scoring payload. Property is sent as + """Parameter to add worker selectors from a job to scoring payload. Property is sent as #: ``selectors``.""" class WorkerSelectorAttachmentKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Supported worker selector attachment types.""" + """Discriminators for supported worker selector attachment types.""" CONDITIONAL = "conditional" """Discriminator value for ConditionalWorkerSelectorAttachment.""" diff --git a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_models.py b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_models.py index 4266a26e2e6f..69f079677439 100644 --- a/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_models.py +++ b/sdk/communication/azure-communication-jobrouter/azure/communication/jobrouter/models/_models.py @@ -1,5 +1,5 @@ # coding=utf-8 -# pylint: disable=too-many-lines,anomalous-backslash-in-string,name-too-long +# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -34,25 +34,25 @@ class AcceptJobOfferResult(_model_base.Model): - """Response containing Id's for the worker, job, and assignment from an accepted offer. + """Response containing ids for the worker, job, and assignment from an accepted offer. All required parameters must be populated in order to send to server. - :ivar assignment_id: The assignment Id that assigns a worker that has accepted an offer to a + :ivar assignment_id: Id of job assignment that assigns a worker that has accepted an offer to a job. Required. :vartype assignment_id: str - :ivar job_id: The Id of the job assigned. Required. + :ivar job_id: Id of the job assigned. Required. :vartype job_id: str - :ivar worker_id: The Id of the worker that has been assigned this job. Required. + :ivar worker_id: Id of the worker that has been assigned this job. Required. :vartype worker_id: str """ assignment_id: str = rest_field(name="assignmentId") - """The assignment Id that assigns a worker that has accepted an offer to a job. Required.""" + """Id of job assignment that assigns a worker that has accepted an offer to a job. Required.""" job_id: str = rest_field(name="jobId") - """The Id of the job assigned. Required.""" + """Id of the job assigned. Required.""" worker_id: str = rest_field(name="workerId") - """The Id of the worker that has been assigned this job. Required.""" + """Id of the worker that has been assigned this job. Required.""" @overload def __init__( @@ -90,24 +90,24 @@ class DistributionMode(_model_base.Model): have. :vartype max_concurrent_offers: int :ivar bypass_selectors: If set to true, then router will match workers to jobs even if they - don't match label selectors. Warning: You may get workers that are not qualified for the job - they are matched with if you set this variable to true. This flag is intended more for - temporary usage. By default, set to false. + don't match label selectors. Warning: You may get workers that are not qualified for a job they + are matched with if you set this variable to true. This flag is intended more for temporary + usage. By default, set to false. :vartype bypass_selectors: bool :ivar kind: The type discriminator describing a sub-type of DistributionMode. Required. Known values are: "bestWorker", "longestIdle", and "roundRobin". :vartype kind: str or ~azure.communication.jobrouter.models.DistributionModeKind """ - __mapping__: Dict[str, _model_base.Model] = {} + min_concurrent_offers: Optional[int] = rest_field(name="minConcurrentOffers") """Governs the minimum desired number of active concurrent offers a job can have.""" max_concurrent_offers: Optional[int] = rest_field(name="maxConcurrentOffers") """Governs the maximum number of active concurrent offers a job can have.""" bypass_selectors: Optional[bool] = rest_field(name="bypassSelectors") """If set to true, then router will match workers to jobs even if they don't match label - selectors. Warning: You may get workers that are not qualified for the job they are matched - with if you set this variable to true. This flag is intended more for temporary usage. By - default, set to false.""" + selectors. Warning: You may get workers that are not qualified for a job they are matched with + if you set this variable to true. This flag is intended more for temporary usage. By default, + set to false.""" kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of DistributionMode. Required. Known values are: \"bestWorker\", \"longestIdle\", and \"roundRobin\".""" @@ -146,9 +146,9 @@ class BestWorkerMode(DistributionMode, discriminator="bestWorker"): have. :vartype max_concurrent_offers: int :ivar bypass_selectors: If set to true, then router will match workers to jobs even if they - don't match label selectors. Warning: You may get workers that are not qualified for the job - they are matched with if you set this variable to true. This flag is intended more for - temporary usage. By default, set to false. + don't match label selectors. Warning: You may get workers that are not qualified for a job they + are matched with if you set this variable to true. This flag is intended more for temporary + usage. By default, set to false. :vartype bypass_selectors: bool :ivar scoring_rule: Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels @@ -213,7 +213,6 @@ class ExceptionAction(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.ExceptionActionKind """ - __mapping__: Dict[str, _model_base.Model] = {} id: Optional[str] = rest_field() """Unique Id of the exception action.""" kind: Literal[None] = rest_discriminator(name="kind") @@ -247,10 +246,10 @@ class CancelExceptionAction(ExceptionAction, discriminator="cancel"): :ivar id: Unique Id of the exception action. :vartype id: str - :ivar note: A note that will be appended to the jobs' Notes collection with the current + :ivar note: A note that will be appended to a job's notes collection with the current timestamp. :vartype note: str - :ivar disposition_code: Indicates the outcome of the job, populate this field with your own + :ivar disposition_code: Indicates the outcome of a job, populate this field with your own custom values. :vartype disposition_code: str :ivar kind: The type discriminator describing a sub-type of ExceptionAction. Required. @@ -259,9 +258,9 @@ class CancelExceptionAction(ExceptionAction, discriminator="cancel"): """ note: Optional[str] = rest_field() - """A note that will be appended to the jobs' Notes collection with the current timestamp.""" + """A note that will be appended to a job's notes collection with the current timestamp.""" disposition_code: Optional[str] = rest_field(name="dispositionCode") - """Indicates the outcome of the job, populate this field with your own custom values.""" + """Indicates the outcome of a job, populate this field with your own custom values.""" kind: Literal[ExceptionActionKind.CANCEL] = rest_discriminator(name="kind") # type: ignore """The type discriminator describing a sub-type of ExceptionAction. Required. Discriminator value for CancelExceptionAction.""" @@ -289,20 +288,20 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class CancelJobOptions(_model_base.Model): - """Request payload for deleting a job. + """Request payload for cancelling a job. - :ivar note: A note that will be appended to the jobs' Notes collection with the current + :ivar note: A note that will be appended to a job's Notes collection with the current timestamp. :vartype note: str - :ivar disposition_code: Indicates the outcome of the job, populate this field with your own + :ivar disposition_code: Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of "Cancelled" is set. :vartype disposition_code: str """ note: Optional[str] = rest_field() - """A note that will be appended to the jobs' Notes collection with the current timestamp.""" + """A note that will be appended to a job's Notes collection with the current timestamp.""" disposition_code: Optional[str] = rest_field(name="dispositionCode") - """Indicates the outcome of the job, populate this field with your own custom values. If not + """Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of \"Cancelled\" is set.""" @overload @@ -338,21 +337,20 @@ class ClassificationPolicy(_model_base.Model): :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: Unique identifier of this policy. Required. + :ivar id: Id of a classification policy. Required. :vartype id: str :ivar name: Friendly name of this policy. :vartype name: str - :ivar fallback_queue_id: The fallback queue to select if the queue selector doesn't find a - match. + :ivar fallback_queue_id: Id of a fallback queue to select if queue selector attachments doesn't + find a match. :vartype fallback_queue_id: str - :ivar queue_selector_attachments: The queue selector attachments used to resolve a queue for a - given job. + :ivar queue_selector_attachments: Queue selector attachments used to resolve a queue for a job. :vartype queue_selector_attachments: list[~azure.communication.jobrouter.models.QueueSelectorAttachment] - :ivar prioritization_rule: The rule to determine a priority score for a given job. + :ivar prioritization_rule: A rule to determine a priority score for a job. :vartype prioritization_rule: ~azure.communication.jobrouter.models.RouterRule - :ivar worker_selector_attachments: The worker selector attachments used to attach worker - selectors to a given job. + :ivar worker_selector_attachments: Worker selector attachments used to attach worker selectors + to a job. :vartype worker_selector_attachments: list[~azure.communication.jobrouter.models.WorkerSelectorAttachment] """ @@ -360,21 +358,21 @@ class ClassificationPolicy(_model_base.Model): etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """Unique identifier of this policy. Required.""" + """Id of a classification policy. Required.""" name: Optional[str] = rest_field() """Friendly name of this policy.""" fallback_queue_id: Optional[str] = rest_field(name="fallbackQueueId") - """The fallback queue to select if the queue selector doesn't find a match.""" + """Id of a fallback queue to select if queue selector attachments doesn't find a match.""" queue_selector_attachments: Optional[List["_models.QueueSelectorAttachment"]] = rest_field( name="queueSelectorAttachments" ) - """The queue selector attachments used to resolve a queue for a given job.""" + """Queue selector attachments used to resolve a queue for a job.""" prioritization_rule: Optional["_models.RouterRule"] = rest_field(name="prioritizationRule") - """The rule to determine a priority score for a given job.""" + """A rule to determine a priority score for a job.""" worker_selector_attachments: Optional[List["_models.WorkerSelectorAttachment"]] = rest_field( name="workerSelectorAttachments" ) - """The worker selector attachments used to attach worker selectors to a given job.""" + """Worker selector attachments used to attach worker selectors to a job.""" @overload def __init__( @@ -402,26 +400,26 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class CloseJobOptions(_model_base.Model): """Request payload for closing jobs. - :ivar disposition_code: Indicates the outcome of the job, populate this field with your own + :ivar disposition_code: Indicates the outcome of a job, populate this field with your own custom values. :vartype disposition_code: str :ivar close_at: If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC. :vartype close_at: ~datetime.datetime - :ivar note: A note that will be appended to the jobs' Notes collection with the current + :ivar note: A note that will be appended to a job's Notes collection with the current timestamp. :vartype note: str """ disposition_code: Optional[str] = rest_field(name="dispositionCode") - """Indicates the outcome of the job, populate this field with your own custom values.""" + """Indicates the outcome of a job, populate this field with your own custom values.""" close_at: Optional[datetime.datetime] = rest_field(name="closeAt", format="rfc3339") """If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC.""" note: Optional[str] = rest_field() - """A note that will be appended to the jobs' Notes collection with the current timestamp.""" + """A note that will be appended to a job's Notes collection with the current timestamp.""" @overload def __init__( @@ -451,13 +449,13 @@ class CloseJobResult(_model_base.Model): class CompleteJobOptions(_model_base.Model): """Request payload for completing jobs. - :ivar note: A note that will be appended to the jobs' Notes collection with the current + :ivar note: A note that will be appended to a job's Notes collection with the current timestamp. :vartype note: str """ note: Optional[str] = rest_field() - """A note that will be appended to the jobs' Notes collection with the current timestamp.""" + """A note that will be appended to a job's Notes collection with the current timestamp.""" @overload def __init__( @@ -498,7 +496,6 @@ class QueueSelectorAttachment(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.QueueSelectorAttachmentKind """ - __mapping__: Dict[str, _model_base.Model] = {} kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of QueueSelectorAttachment. Required. Known values are: \"conditional\", \"passThrough\", \"ruleEngine\", \"static\", and \"weightedAllocation\".""" @@ -569,7 +566,6 @@ class WorkerSelectorAttachment(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.WorkerSelectorAttachmentKind """ - __mapping__: Dict[str, _model_base.Model] = {} kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of WorkerSelectorAttachment. Required. Known values are: \"conditional\", \"passThrough\", \"ruleEngine\", \"static\", and @@ -686,7 +682,6 @@ class RouterRule(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.RouterRuleKind """ - __mapping__: Dict[str, _model_base.Model] = {} kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of RouterRule. Required. Known values are: \"directMap\", \"expression\", \"function\", \"static\", and \"webhook\".""" @@ -724,27 +719,27 @@ class DistributionPolicy(_model_base.Model): :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: The unique identifier of the policy. Required. + :ivar id: Id of a distribution policy. Required. :vartype id: str - :ivar name: The human readable name of the policy. + :ivar name: Friendly name of this policy. :vartype name: str - :ivar offer_expires_after_seconds: The number of seconds after which any offers created under - this policy will be expired. + :ivar offer_expires_after_seconds: Number of seconds after which any offers created under this + policy will be expired. :vartype offer_expires_after_seconds: float - :ivar mode: Abstract base class for defining a distribution mode. + :ivar mode: Mode governing the specific distribution method. :vartype mode: ~azure.communication.jobrouter.models.DistributionMode """ etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """The unique identifier of the policy. Required.""" + """Id of a distribution policy. Required.""" name: Optional[str] = rest_field() - """The human readable name of the policy.""" + """Friendly name of this policy.""" offer_expires_after_seconds: Optional[float] = rest_field(name="offerExpiresAfterSeconds") - """The number of seconds after which any offers created under this policy will be expired.""" + """Number of seconds after which any offers created under this policy will be expired.""" mode: Optional["_models.DistributionMode"] = rest_field() - """Abstract base class for defining a distribution mode.""" + """Mode governing the specific distribution method.""" @overload def __init__( @@ -776,9 +771,9 @@ class ExceptionPolicy(_model_base.Model): :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: The Id of the exception policy. Required. + :ivar id: Id of an exception policy. Required. :vartype id: str - :ivar name: The name of the exception policy. + :ivar name: Friendly name of this policy. :vartype name: str :ivar exception_rules: A collection of exception rules on the exception policy. :vartype exception_rules: list[~azure.communication.jobrouter.models.ExceptionRule] @@ -787,9 +782,9 @@ class ExceptionPolicy(_model_base.Model): etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """The Id of the exception policy. Required.""" + """Id of an exception policy. Required.""" name: Optional[str] = rest_field() - """The name of the exception policy.""" + """Friendly name of this policy.""" exception_rules: Optional[List["_models.ExceptionRule"]] = rest_field(name="exceptionRules") """A collection of exception rules on the exception policy.""" @@ -818,7 +813,7 @@ class ExceptionRule(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar id: Id of the exception rule. Required. + :ivar id: Id of an exception rule. Required. :vartype id: str :ivar trigger: The trigger for this exception rule. Required. :vartype trigger: ~azure.communication.jobrouter.models.ExceptionTrigger @@ -827,7 +822,7 @@ class ExceptionRule(_model_base.Model): """ id: str = rest_field() - """Id of the exception rule. Required.""" + """Id of an exception rule. Required.""" trigger: "_models.ExceptionTrigger" = rest_field() """The trigger for this exception rule. Required.""" actions: List["_models.ExceptionAction"] = rest_field() @@ -855,7 +850,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class ExceptionTrigger(_model_base.Model): - """The trigger for this exception rule. + """Abstract base class for defining a trigger for exception rules. You probably want to use the sub-classes and not this class directly. Known sub-classes are: QueueLengthExceptionTrigger, WaitTimeExceptionTrigger @@ -867,7 +862,6 @@ class ExceptionTrigger(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.ExceptionTriggerKind """ - __mapping__: Dict[str, _model_base.Model] = {} kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of ExceptionTrigger. Required. Known values are: \"queueLength\" and \"waitTime\".""" @@ -884,8 +878,8 @@ class ExpressionRouterRule(RouterRule, discriminator="expression"): :ivar language: The expression language to compile to and execute. "powerFx" :vartype language: str or ~azure.communication.jobrouter.models.ExpressionRouterRuleLanguage - :ivar expression: The string containing the expression to evaluate. Should contain return - statement with calculated values. Required. + :ivar expression: An expression to evaluate. Should contain return statement with calculated + values. Required. :vartype expression: str :ivar kind: The type discriminator describing a sub-type of Rule. Required. Discriminator value for ExpressionRouterRule. @@ -895,8 +889,7 @@ class ExpressionRouterRule(RouterRule, discriminator="expression"): language: Optional[Union[str, "_models.ExpressionRouterRuleLanguage"]] = rest_field() """The expression language to compile to and execute. \"powerFx\"""" expression: str = rest_field() - """The string containing the expression to evaluate. Should contain return statement with - calculated values. Required.""" + """An expression to evaluate. Should contain return statement with calculated values. Required.""" kind: Literal[RouterRuleKind.EXPRESSION] = rest_discriminator(name="kind") # type: ignore """The type discriminator describing a sub-type of Rule. Required. Discriminator value for ExpressionRouterRule.""" @@ -1026,7 +1019,6 @@ class JobMatchingMode(_model_base.Model): :vartype kind: str or ~azure.communication.jobrouter.models.JobMatchingModeKind """ - __mapping__: Dict[str, _model_base.Model] = {} kind: Literal[None] = rest_discriminator(name="kind") """The type discriminator describing a sub-type of JobMatchingMode. Required. Known values are: \"queueAndMatch\", \"scheduleAndSuspend\", and \"suspend\".""" @@ -1048,9 +1040,9 @@ class LongestIdleMode(DistributionMode, discriminator="longestIdle"): have. :vartype max_concurrent_offers: int :ivar bypass_selectors: If set to true, then router will match workers to jobs even if they - don't match label selectors. Warning: You may get workers that are not qualified for the job - they are matched with if you set this variable to true. This flag is intended more for - temporary usage. By default, set to false. + don't match label selectors. Warning: You may get workers that are not qualified for a job they + are matched with if you set this variable to true. This flag is intended more for temporary + usage. By default, set to false. :vartype bypass_selectors: bool :ivar kind: The type discriminator describing a sub-type of Mode. Required. Discriminator value for LongestIdleMode. @@ -1171,7 +1163,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class PassThroughQueueSelectorAttachment(QueueSelectorAttachment, discriminator="passThrough"): - """Attaches a queue selector where the value is passed through from the job label with the same + """Attaches a queue selector where the value is passed through from a job's label with the same key. All required parameters must be populated in order to send to server. @@ -1219,7 +1211,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class PassThroughWorkerSelectorAttachment(WorkerSelectorAttachment, discriminator="passThrough"): - """Attaches a worker selector where the value is passed through from the job label with the same + """Attaches a worker selector where the value is passed through from a job's label with the same key. All required parameters must be populated in order to send to server. @@ -1439,9 +1431,9 @@ class RoundRobinMode(DistributionMode, discriminator="roundRobin"): have. :vartype max_concurrent_offers: int :ivar bypass_selectors: If set to true, then router will match workers to jobs even if they - don't match label selectors. Warning: You may get workers that are not qualified for the job - they are matched with if you set this variable to true. This flag is intended more for - temporary usage. By default, set to false. + don't match label selectors. Warning: You may get workers that are not qualified for a job they + are matched with if you set this variable to true. This flag is intended more for temporary + usage. By default, set to false. :vartype bypass_selectors: bool :ivar kind: The type discriminator describing a sub-type of Mode. Required. Discriminator value for RoundRobinMode. @@ -1479,7 +1471,7 @@ class RouterChannel(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar channel_id: Id of the channel. Required. + :ivar channel_id: Id of a channel. Required. :vartype channel_id: str :ivar capacity_cost_per_job: The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. Required. @@ -1490,7 +1482,7 @@ class RouterChannel(_model_base.Model): """ channel_id: str = rest_field(name="channelId") - """Id of the channel. Required.""" + """Id of a channel. Required.""" capacity_cost_per_job: int = rest_field(name="capacityCostPerJob") """The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. Required.""" @@ -1527,31 +1519,31 @@ class RouterJob(_model_base.Model): # pylint: disable=too-many-instance-attribu :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: The id of the job. Required. + :ivar id: Id of a job. Required. :vartype id: str :ivar channel_reference: Reference to an external parent context, eg. call ID. :vartype channel_reference: str - :ivar status: The status of the Job. Known values are: "pendingClassification", "queued", + :ivar status: The status of the job. Known values are: "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", and "waitingForActivation". :vartype status: str or ~azure.communication.jobrouter.models.RouterJobStatus - :ivar enqueued_at: The time a job was queued in UTC. + :ivar enqueued_at: Timestamp a job was queued in UTC. :vartype enqueued_at: ~datetime.datetime :ivar channel_id: The channel identifier. eg. voice, chat, etc. :vartype channel_id: str - :ivar classification_policy_id: The Id of the Classification policy used for classifying a job. + :ivar classification_policy_id: Id of a classification policy used for classifying this job. :vartype classification_policy_id: str - :ivar queue_id: The Id of the Queue that this job is queued to. + :ivar queue_id: Id of a queue that this job is queued to. :vartype queue_id: str - :ivar priority: The priority of this job. + :ivar priority: Priority of this job. :vartype priority: int :ivar disposition_code: Reason code for cancelled or closed jobs. :vartype disposition_code: str - :ivar requested_worker_selectors: A collection of manually specified label selectors, which a + :ivar requested_worker_selectors: A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. :vartype requested_worker_selectors: list[~azure.communication.jobrouter.models.RouterWorkerSelector] - :ivar attached_worker_selectors: A collection of label selectors attached by a classification + :ivar attached_worker_selectors: A collection of worker selectors attached by a classification policy, which a worker must satisfy in order to process this job. :vartype attached_worker_selectors: list[~azure.communication.jobrouter.models.RouterWorkerSelector] @@ -1575,34 +1567,34 @@ class RouterJob(_model_base.Model): # pylint: disable=too-many-instance-attribu etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """The id of the job. Required.""" + """Id of a job. Required.""" channel_reference: Optional[str] = rest_field(name="channelReference") """Reference to an external parent context, eg. call ID.""" status: Optional[Union[str, "_models.RouterJobStatus"]] = rest_field(visibility=["read"]) - """The status of the Job. Known values are: \"pendingClassification\", \"queued\", \"assigned\", + """The status of the job. Known values are: \"pendingClassification\", \"queued\", \"assigned\", \"completed\", \"closed\", \"cancelled\", \"classificationFailed\", \"created\", \"pendingSchedule\", \"scheduled\", \"scheduleFailed\", and \"waitingForActivation\".""" enqueued_at: Optional[datetime.datetime] = rest_field(name="enqueuedAt", visibility=["read"], format="rfc3339") - """The time a job was queued in UTC.""" + """Timestamp a job was queued in UTC.""" channel_id: Optional[str] = rest_field(name="channelId") """The channel identifier. eg. voice, chat, etc.""" classification_policy_id: Optional[str] = rest_field(name="classificationPolicyId") - """The Id of the Classification policy used for classifying a job.""" + """Id of a classification policy used for classifying this job.""" queue_id: Optional[str] = rest_field(name="queueId") - """The Id of the Queue that this job is queued to.""" + """Id of a queue that this job is queued to.""" priority: Optional[int] = rest_field() - """The priority of this job.""" + """Priority of this job.""" disposition_code: Optional[str] = rest_field(name="dispositionCode") """Reason code for cancelled or closed jobs.""" requested_worker_selectors: Optional[List["_models.RouterWorkerSelector"]] = rest_field( name="requestedWorkerSelectors" ) - """A collection of manually specified label selectors, which a worker must satisfy in order to + """A collection of manually specified worker selectors, which a worker must satisfy in order to process this job.""" attached_worker_selectors: Optional[List["_models.RouterWorkerSelector"]] = rest_field( name="attachedWorkerSelectors", visibility=["read"] ) - """A collection of label selectors attached by a classification policy, which a worker must + """A collection of worker selectors attached by a classification policy, which a worker must satisfy in order to process this job.""" labels: Optional[Dict[str, Any]] = rest_field() """A set of key/value pairs that are identifying attributes used by the rules engines to make @@ -1656,28 +1648,28 @@ class RouterJobAssignment(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar assignment_id: The Id of the job assignment. Required. + :ivar assignment_id: Id of a job assignment. Required. :vartype assignment_id: str - :ivar worker_id: The Id of the Worker assigned to the job. + :ivar worker_id: Id of the Worker assigned to the job. :vartype worker_id: str - :ivar assigned_at: The assignment time of the job in UTC. Required. + :ivar assigned_at: Timestamp when the job was assigned to a worker in UTC. Required. :vartype assigned_at: ~datetime.datetime - :ivar completed_at: The time the job was marked as completed after being assigned in UTC. + :ivar completed_at: Timestamp when the job was marked as completed after being assigned in UTC. :vartype completed_at: ~datetime.datetime - :ivar closed_at: The time the job was marked as closed after being completed in UTC. + :ivar closed_at: Timestamp when the job was marked as closed after being completed in UTC. :vartype closed_at: ~datetime.datetime """ assignment_id: str = rest_field(name="assignmentId", visibility=["read"]) - """The Id of the job assignment. Required.""" + """Id of a job assignment. Required.""" worker_id: Optional[str] = rest_field(name="workerId") - """The Id of the Worker assigned to the job.""" + """Id of the Worker assigned to the job.""" assigned_at: datetime.datetime = rest_field(name="assignedAt", format="rfc3339") - """The assignment time of the job in UTC. Required.""" + """Timestamp when the job was assigned to a worker in UTC. Required.""" completed_at: Optional[datetime.datetime] = rest_field(name="completedAt", format="rfc3339") - """The time the job was marked as completed after being assigned in UTC.""" + """Timestamp when the job was marked as completed after being assigned in UTC.""" closed_at: Optional[datetime.datetime] = rest_field(name="closedAt", format="rfc3339") - """The time the job was marked as closed after being completed in UTC.""" + """Timestamp when the job was marked as closed after being completed in UTC.""" @overload def __init__( @@ -1745,28 +1737,28 @@ class RouterJobOffer(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar offer_id: The Id of the offer. Required. + :ivar offer_id: Id of an offer. Required. :vartype offer_id: str - :ivar job_id: The Id of the job. Required. + :ivar job_id: Id of the job. Required. :vartype job_id: str :ivar capacity_cost: The capacity cost consumed by the job offer. Required. :vartype capacity_cost: int - :ivar offered_at: The time the offer was created in UTC. + :ivar offered_at: Timestamp when the offer was created in UTC. :vartype offered_at: ~datetime.datetime - :ivar expires_at: The time that the offer will expire in UTC. + :ivar expires_at: Timestamp when the offer will expire in UTC. :vartype expires_at: ~datetime.datetime """ offer_id: str = rest_field(name="offerId", visibility=["read"]) - """The Id of the offer. Required.""" + """Id of an offer. Required.""" job_id: str = rest_field(name="jobId") - """The Id of the job. Required.""" + """Id of the job. Required.""" capacity_cost: int = rest_field(name="capacityCost") """The capacity cost consumed by the job offer. Required.""" offered_at: Optional[datetime.datetime] = rest_field(name="offeredAt", format="rfc3339") - """The time the offer was created in UTC.""" + """Timestamp when the offer was created in UTC.""" expires_at: Optional[datetime.datetime] = rest_field(name="expiresAt", format="rfc3339") - """The time that the offer will expire in UTC.""" + """Timestamp when the offer will expire in UTC.""" @overload def __init__( @@ -1851,34 +1843,34 @@ class RouterQueue(_model_base.Model): :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: The Id of this queue. Required. + :ivar id: Id of a queue. Required. :vartype id: str - :ivar name: The name of this queue. + :ivar name: Friendly name of this queue. :vartype name: str - :ivar distribution_policy_id: The ID of the distribution policy that will determine how a job - is distributed to workers. + :ivar distribution_policy_id: Id of a distribution policy that will determine how a job is + distributed to workers. :vartype distribution_policy_id: str :ivar labels: A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. :vartype labels: dict[str, any] - :ivar exception_policy_id: The ID of the exception policy that determines various job - escalation rules. + :ivar exception_policy_id: Id of an exception policy that determines various job escalation + rules. :vartype exception_policy_id: str """ etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """The Id of this queue. Required.""" + """Id of a queue. Required.""" name: Optional[str] = rest_field() - """The name of this queue.""" + """Friendly name of this queue.""" distribution_policy_id: Optional[str] = rest_field(name="distributionPolicyId") - """The ID of the distribution policy that will determine how a job is distributed to workers.""" + """Id of a distribution policy that will determine how a job is distributed to workers.""" labels: Optional[Dict[str, Any]] = rest_field() """A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.""" exception_policy_id: Optional[str] = rest_field(name="exceptionPolicyId") - """The ID of the exception policy that determines various job escalation rules.""" + """Id of an exception policy that determines various job escalation rules.""" @overload def __init__( @@ -2007,12 +1999,11 @@ class RouterWorker(_model_base.Model): # pylint: disable=too-many-instance-attr :ivar etag: The entity tag for this resource. Required. :vartype etag: str - :ivar id: Id of the worker. Required. + :ivar id: Id of a worker. Required. :vartype id: str - :ivar state: The current state of the worker. Known values are: "active", "draining", and - "inactive". + :ivar state: Current state of a worker. Known values are: "active", "draining", and "inactive". :vartype state: str or ~azure.communication.jobrouter.models.RouterWorkerState - :ivar queues: The queue(s) that this worker can receive work from. + :ivar queues: Collection of queue(s) that this worker can receive work from. :vartype queues: list[str] :ivar capacity: The total capacity score this worker has to manage multiple concurrent jobs. :vartype capacity: int @@ -2022,7 +2013,8 @@ class RouterWorker(_model_base.Model): # pylint: disable=too-many-instance-attr :ivar tags: A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. :vartype tags: dict[str, any] - :ivar channels: The channel(s) this worker can handle and their impact on the workers capacity. + :ivar channels: Collection of channel(s) this worker can handle and their impact on the workers + capacity. :vartype channels: list[~azure.communication.jobrouter.models.RouterChannel] :ivar offers: A list of active offers issued to this worker. :vartype offers: list[~azure.communication.jobrouter.models.RouterJobOffer] @@ -2038,11 +2030,11 @@ class RouterWorker(_model_base.Model): # pylint: disable=too-many-instance-attr etag: str = rest_field(visibility=["read"]) """The entity tag for this resource. Required.""" id: str = rest_field(visibility=["read"]) - """Id of the worker. Required.""" + """Id of a worker. Required.""" state: Optional[Union[str, "_models.RouterWorkerState"]] = rest_field(visibility=["read"]) - """The current state of the worker. Known values are: \"active\", \"draining\", and \"inactive\".""" + """Current state of a worker. Known values are: \"active\", \"draining\", and \"inactive\".""" queues: Optional[List[str]] = rest_field() - """The queue(s) that this worker can receive work from.""" + """Collection of queue(s) that this worker can receive work from.""" capacity: Optional[int] = rest_field() """The total capacity score this worker has to manage multiple concurrent jobs.""" labels: Optional[Dict[str, Any]] = rest_field() @@ -2052,7 +2044,7 @@ class RouterWorker(_model_base.Model): # pylint: disable=too-many-instance-attr """A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean.""" channels: Optional[List["_models.RouterChannel"]] = rest_field() - """The channel(s) this worker can handle and their impact on the workers capacity.""" + """Collection of channel(s) this worker can handle and their impact on the workers capacity.""" offers: Optional[List["_models.RouterJobOffer"]] = rest_field(visibility=["read"]) """A list of active offers issued to this worker.""" assigned_jobs: Optional[List["_models.RouterWorkerAssignment"]] = rest_field( @@ -2094,9 +2086,9 @@ class RouterWorkerAssignment(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar assignment_id: The Id of the assignment. Required. + :ivar assignment_id: Id of the assignment. Required. :vartype assignment_id: str - :ivar job_id: The Id of the Job assigned. Required. + :ivar job_id: Id of the job assigned. Required. :vartype job_id: str :ivar capacity_cost: The amount of capacity this assignment has consumed on the worker. Required. @@ -2106,9 +2098,9 @@ class RouterWorkerAssignment(_model_base.Model): """ assignment_id: str = rest_field(name="assignmentId") - """The Id of the assignment. Required.""" + """Id of the assignment. Required.""" job_id: str = rest_field(name="jobId") - """The Id of the Job assigned. Required.""" + """Id of the job assigned. Required.""" capacity_cost: int = rest_field(name="capacityCost") """The amount of capacity this assignment has consumed on the worker. Required.""" assigned_at: datetime.datetime = rest_field(name="assignedAt", format="rfc3339") @@ -2146,7 +2138,7 @@ class RouterWorkerSelector(_model_base.Model): :ivar key: The label key to query against. Required. :vartype key: str :ivar label_operator: Describes how the value of the label is compared to the value defined on - the label selector. Required. Known values are: "equal", "notEqual", "lessThan", + the worker selector. Required. Known values are: "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", and "greaterThanOrEqual". :vartype label_operator: str or ~azure.communication.jobrouter.models.LabelOperator :ivar value: The value to compare against the actual label value with the given operator. @@ -2154,9 +2146,9 @@ class RouterWorkerSelector(_model_base.Model): :vartype value: any :ivar expires_after_seconds: Describes how long this label selector is valid in seconds. :vartype expires_after_seconds: float - :ivar expedite: Pushes the job to the front of the queue as long as this selector is active. + :ivar expedite: Pushes a job to the front of the queue as long as this selector is active. :vartype expedite: bool - :ivar status: The status of the worker selector. Known values are: "active" and "expired". + :ivar status: Status of the worker selector. Known values are: "active" and "expired". :vartype status: str or ~azure.communication.jobrouter.models.RouterWorkerSelectorStatus :ivar expires_at: The time at which this worker selector expires in UTC. :vartype expires_at: ~datetime.datetime @@ -2165,7 +2157,7 @@ class RouterWorkerSelector(_model_base.Model): key: str = rest_field() """The label key to query against. Required.""" label_operator: Union[str, "_models.LabelOperator"] = rest_field(name="labelOperator") - """Describes how the value of the label is compared to the value defined on the label selector. + """Describes how the value of the label is compared to the value defined on the worker selector. Required. Known values are: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", and \"greaterThanOrEqual\".""" value: Optional[Any] = rest_field() @@ -2174,9 +2166,9 @@ class RouterWorkerSelector(_model_base.Model): expires_after_seconds: Optional[float] = rest_field(name="expiresAfterSeconds") """Describes how long this label selector is valid in seconds.""" expedite: Optional[bool] = rest_field() - """Pushes the job to the front of the queue as long as this selector is active.""" + """Pushes a job to the front of the queue as long as this selector is active.""" status: Optional[Union[str, "_models.RouterWorkerSelectorStatus"]] = rest_field(visibility=["read"]) - """The status of the worker selector. Known values are: \"active\" and \"expired\".""" + """Status of the worker selector. Known values are: \"active\" and \"expired\".""" expires_at: Optional[datetime.datetime] = rest_field(name="expiresAt", visibility=["read"], format="rfc3339") """The time at which this worker selector expires in UTC.""" @@ -2285,7 +2277,7 @@ class ScheduleAndSuspendMode(JobMatchingMode, discriminator="scheduleAndSuspend" All required parameters must be populated in order to send to server. - :ivar schedule_at: Scheduled time. Required. + :ivar schedule_at: Requested schedule time. Required. :vartype schedule_at: ~datetime.datetime :ivar kind: The type discriminator describing ScheduleAndSuspendMode. Required. Discriminator value for ScheduleAndSuspendMode. @@ -2293,7 +2285,7 @@ class ScheduleAndSuspendMode(JobMatchingMode, discriminator="scheduleAndSuspend" """ schedule_at: datetime.datetime = rest_field(name="scheduleAt", format="rfc3339") - """Scheduled time. Required.""" + """Requested schedule time. Required.""" kind: Literal[JobMatchingModeKind.SCHEDULE_AND_SUSPEND] = rest_discriminator(name="kind") # type: ignore """The type discriminator describing ScheduleAndSuspendMode. Required. Discriminator value for ScheduleAndSuspendMode.""" @@ -2324,11 +2316,10 @@ class ScoringRuleOptions(_model_base.Model): :ivar batch_size: Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. :vartype batch_size: int - :ivar scoring_parameters: List of extra parameters from the job that will be sent as part of - the payload to scoring rule. If not set, the job's labels (sent in the payload as ``job``\ ) - and the job's worker selectors (sent in the payload as ``selectors``\ ) are added to the - payload of the scoring rule by default. Note: Worker labels are always sent with scoring - payload. + :ivar scoring_parameters: List of extra parameters from a job that will be sent as part of the + payload to scoring rule. If not set, a job's labels (sent in the payload as ``job``\ ) and a + job's worker selectors (sent in the payload as ``selectors``\ ) are added to the payload of the + scoring rule by default. Note: Worker labels are always sent with scoring payload. :vartype scoring_parameters: list[str or ~azure.communication.jobrouter.models.ScoringRuleParameterSelector] :ivar is_batch_scoring_enabled: If set to true, will score workers in batches, and the @@ -2345,8 +2336,8 @@ class ScoringRuleOptions(_model_base.Model): scoring_parameters: Optional[List[Union[str, "_models.ScoringRuleParameterSelector"]]] = rest_field( name="scoringParameters" ) - """List of extra parameters from the job that will be sent as part of the payload to scoring rule. - If not set, the job's labels (sent in the payload as ``job``\ ) and the job's worker selectors + """List of extra parameters from a job that will be sent as part of the payload to scoring rule. + If not set, a job's labels (sent in the payload as ``job``\ ) and a job's worker selectors (sent in the payload as ``selectors``\ ) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload.""" is_batch_scoring_enabled: Optional[bool] = rest_field(name="isBatchScoringEnabled") @@ -2379,7 +2370,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class StaticQueueSelectorAttachment(QueueSelectorAttachment, discriminator="static"): - """Describes a queue selector that will be attached to the job. + """Describes a queue selector that will be attached to a job. All required parameters must be populated in order to send to server. @@ -2457,7 +2448,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class StaticWorkerSelectorAttachment(WorkerSelectorAttachment, discriminator="static"): - """Describes a worker selector that will be attached to the job. + """Describes a worker selector that will be attached to a job. All required parameters must be populated in order to send to server. @@ -2515,13 +2506,13 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class UnassignJobOptions(_model_base.Model): """Request payload for unassigning a job. - :ivar suspend_matching: If SuspendMatching is true, then the job is not queued for re-matching + :ivar suspend_matching: If SuspendMatching is true, then a job is not queued for re-matching with a worker. :vartype suspend_matching: bool """ suspend_matching: Optional[bool] = rest_field(name="suspendMatching") - """If SuspendMatching is true, then the job is not queued for re-matching with a worker.""" + """If SuspendMatching is true, then a job is not queued for re-matching with a worker.""" @overload def __init__( @@ -2547,14 +2538,14 @@ class UnassignJobResult(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar job_id: The Id of the job unassigned. Required. + :ivar job_id: Id of an unassigned job. Required. :vartype job_id: str :ivar unassignment_count: The number of times a job is unassigned. At a maximum 3. Required. :vartype unassignment_count: int """ job_id: str = rest_field(name="jobId") - """The Id of the job unassigned. Required.""" + """Id of an unassigned job. Required.""" unassignment_count: int = rest_field(name="unassignmentCount") """The number of times a job is unassigned. At a maximum 3. Required.""" diff --git a/sdk/communication/azure-communication-jobrouter/tsp-location.yaml b/sdk/communication/azure-communication-jobrouter/tsp-location.yaml index c8ac3bca2f96..bb0b00477bee 100644 --- a/sdk/communication/azure-communication-jobrouter/tsp-location.yaml +++ b/sdk/communication/azure-communication-jobrouter/tsp-location.yaml @@ -1,5 +1,5 @@ repo: Azure/azure-rest-api-specs additionalDirectories: [] directory: specification/communication/Communication.JobRouter -commit: 75065f761aba389ba50ce9a33f9a9da6a2ae288d +commit: fae971a688cb023c19708a7551da18ea22dff5d5