Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLU] regen on 2022-10-01-preview for runtime #26233

Merged
merged 8 commits into from
Oct 18, 2022
Prev Previous commit
Next Next commit
add rest api docs to the docstrings
kristapratico committed Sep 27, 2022

Verified

This commit was signed with the committer’s verified signature.
StevenKKC Steven Maksym
commit 61a49432048aaf7862447c44f8b8438cbda69f8b
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Dict

from azure.core.credentials import TokenCredential


Original file line number Diff line number Diff line change
@@ -87,7 +87,9 @@ def build_conversation_analysis_request(**kwargs: Any) -> HttpRequest:
class ConversationAnalysisClientOperationsMixin(MixinABC):
@overload
def analyze_conversation(self, task: JSON, *, content_type: str = "application/json", **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Required.
:type task: JSON
@@ -202,7 +204,9 @@ def analyze_conversation(self, task: JSON, *, content_type: str = "application/j

@overload
def analyze_conversation(self, task: IO, *, content_type: str = "application/json", **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Required.
:type task: IO
@@ -275,7 +279,9 @@ def analyze_conversation(self, task: IO, *, content_type: str = "application/jso

@distributed_trace
def analyze_conversation(self, task: Union[JSON, IO], **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Is either a model type or a IO type.
Required.
@@ -472,7 +478,9 @@ def begin_conversation_analysis(
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute.
Required.
@@ -591,7 +599,9 @@ def begin_conversation_analysis(
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute.
Required.
@@ -695,7 +705,9 @@ def begin_conversation_analysis(self, task: Union[JSON, IO], **kwargs: Any) -> L
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute. Is
either a model type or a IO type. Required.
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Dict

from azure.core.credentials_async import AsyncTokenCredential


Original file line number Diff line number Diff line change
@@ -40,7 +40,9 @@
class ConversationAnalysisClientOperationsMixin(MixinABC):
@overload
async def analyze_conversation(self, task: JSON, *, content_type: str = "application/json", **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Required.
:type task: JSON
@@ -155,7 +157,9 @@ async def analyze_conversation(self, task: JSON, *, content_type: str = "applica

@overload
async def analyze_conversation(self, task: IO, *, content_type: str = "application/json", **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Required.
:type task: IO
@@ -228,7 +232,9 @@ async def analyze_conversation(self, task: IO, *, content_type: str = "applicati

@distributed_trace_async
async def analyze_conversation(self, task: Union[JSON, IO], **kwargs: Any) -> JSON:
"""Analyzes the input conversation utterance.
"""Analyzes the input conversation utterance. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/analyze-conversation
for more information.
:param task: A single conversational task to execute. Is either a model type or a IO type.
Required.
@@ -425,7 +431,9 @@ async def begin_conversation_analysis(
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute.
Required.
@@ -544,7 +552,9 @@ async def begin_conversation_analysis(
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute.
Required.
@@ -648,7 +658,9 @@ async def begin_conversation_analysis(self, task: Union[JSON, IO], **kwargs: Any
"""Submit analysis job for conversations.
Submit a collection of conversations for analysis. Specify one or more unique tasks to be
executed.
executed. See
https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/submit-job for more
information.
:param task: The collection of conversations to analyze and one or more tasks to execute. Is
either a model type or a IO type. Required.
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Dict

from azure.core.credentials import TokenCredential


Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Dict

from azure.core.credentials_async import AsyncTokenCredential


Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -71,6 +71,24 @@ Customizations that should eventually be added to central autorest configuration

### General customizations

#### Add rest api docs to operations

```yaml
directive:
- from: analyzeconversations-authoring.json
where: $.paths.*.*
transform: |
var operationId = $.operationId.replace(/_/g, "/").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
$.description = $.description + " See https://learn.microsoft.com/rest/api/language/" + operationId + " for more information.";
kristapratico marked this conversation as resolved.
Show resolved Hide resolved
- from: analyzeconversations.json
where: $.paths.*.*
transform: |
var operationId = $.operationId.replace(/_/g, "/").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().split("/")[1];
$.description = $.description + " See https://learn.microsoft.com/rest/api/language/conversation-analysis-runtime/" + operationId + " for more information.";
```



```yaml
directive:
# Support automatically generating code for key credentials.