Skip to content

Commit fae822a

Browse files
guy-microsoftSDKAutoqiaozha
authored
Azure Healthbot Az CLI extension (#2965)
* CodeGen from PR 12263 in Azure/azure-rest-api-specs Healthbot - Update Python.md based on az cli extension doc & Create Java.md file. (#12263) * Update python.md. * Update python.md. * Create Java.md * Create Java.md * Updated python.md with track2 configuration. * Updated python.md with track2 configuration. * Updated python.md with track2 configuration. * Update specification/healthbot/resource-manager/readme.python.md Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> * Update specification/healthbot/resource-manager/readme.python.md Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> * Updated python.md with track2 configuration. * Update specification/healthbot/resource-manager/readme.python.md Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> * Update specification/healthbot/resource-manager/readme.python.md Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> * Updated python.md with track2 configuration. * Revert changes python.md. * Revert "Revert changes python.md." This reverts commit f0a48ae5 * Revert "Revert changes python.md." This reverts commit f0a48ae5 * Add Java section. * Add "title". Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> * Fixes based on review. * Fixes based on review. * Fixes based on review. * Remove extra line. * Change name to sku. * Change name to sku. * Change name to sku. * Fiz autogenerated CLI issues. * Add recordings for healthbot tests. * Add recordings for healthbot tests. * retrigger checks Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com>
1 parent 7d982c9 commit fae822a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4215
-0
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262

6363
/src/healthcareapis/ @fengzhou-msft
6464

65+
/src/healthbot/ @guy-microsoft
66+
6567
/src/hack/ @geektrainer
6668

6769
/src/internet-analyzer/ @jsntcy

src/healthbot/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/healthbot/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Azure CLI healthbot Extension #
2+
This is the extension for healthbot.
3+
The Azure Health Bot service empowers healthcare organizations to build and deploy an AI-powered, compliant, conversational healthcare experience at scale.
4+
The service combines built-in medical intelligence with natural language capabilities, extensibility tools and compliance constructs, allowing healthcare organizations such as Providers, Payers, Pharma, HMOs, Telehealth to give people access to trusted and relevant healthcare services and information.
5+
6+
### How to use ###
7+
Install this extension using the below CLI command
8+
```
9+
az extension add --name healthbot
10+
```
11+
12+
### Included Features ###
13+
#### healthbot ####
14+
##### Create #####
15+
```
16+
az healthbot create --name "samplebotname" --location "East US" --sku "F0" --resource-group "healthbotClient"
17+
```
18+
##### Show #####
19+
```
20+
az healthbot show --name "samplebotname" --resource-group "healthbotClient"
21+
```
22+
##### List #####
23+
```
24+
az healthbot list --resource-group "OneResourceGroupName"
25+
```
26+
##### Update #####
27+
```
28+
az healthbot update --name "samplebotname" --sku "F0" --resource-group "healthbotClient"
29+
```
30+
##### Delete #####
31+
```
32+
az healthbot delete --name "samplebotname" --resource-group "healthbotClient"
33+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_healthbot.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_healthbot.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class HealthbotClientCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_healthbot.generated._client_factory import cf_healthbot_cl
24+
healthbot_custom = CliCommandType(
25+
operations_tmpl='azext_healthbot.custom#{}',
26+
client_factory=cf_healthbot_cl)
27+
parent = super(HealthbotClientCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=healthbot_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_healthbot.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_healthbot.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_healthbot.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_healthbot.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = HealthbotClientCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_healthbot_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from azext_healthbot.vendored_sdks.healthbot import HealthbotClient
15+
return get_mgmt_service_client(cli_ctx,
16+
HealthbotClient)
17+
18+
19+
def cf_bot(cli_ctx, *_):
20+
return cf_healthbot_cl(cli_ctx).bots
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=too-many-lines
11+
12+
from knack.help_files import helps
13+
14+
15+
helps['healthbot'] = """
16+
type: group
17+
short-summary: Manage bot with healthbot
18+
"""
19+
20+
helps['healthbot list'] = """
21+
type: command
22+
short-summary: "Returns all the resources of a particular type belonging to a resource group And Returns all the \
23+
resources of a particular type belonging to a subscription."
24+
examples:
25+
- name: List Bots by Resource Group
26+
text: |-
27+
az healthbot list --resource-group "OneResourceGroupName"
28+
- name: List Bots by Subscription
29+
text: |-
30+
az healthbot list
31+
"""
32+
33+
helps['healthbot show'] = """
34+
type: command
35+
short-summary: "Get a HealthBot."
36+
examples:
37+
- name: ResourceInfoGet
38+
text: |-
39+
az healthbot show --name "samplebotname" --resource-group "healthbotClient"
40+
"""
41+
42+
helps['healthbot create'] = """
43+
type: command
44+
short-summary: "Create a new HealthBot."
45+
examples:
46+
- name: BotCreate
47+
text: |-
48+
az healthbot create --name "samplebotname" --location "East US" --sku "F0" --resource-group \
49+
"healthbotClient"
50+
"""
51+
52+
helps['healthbot update'] = """
53+
type: command
54+
short-summary: "Patch a HealthBot."
55+
examples:
56+
- name: BotUpdate
57+
text: |-
58+
az healthbot update --bot-name "samplebotname" --name "F0" --resource-group "healthbotClient"
59+
"""
60+
61+
helps['healthbot delete'] = """
62+
type: command
63+
short-summary: "Delete a HealthBot."
64+
examples:
65+
- name: BotDelete
66+
text: |-
67+
az healthbot delete --name "samplebotname" --resource-group "healthbotClient"
68+
"""
69+
70+
helps['healthbot wait'] = """
71+
type: command
72+
short-summary: Place the CLI in a waiting state until a condition of the healthbot is met.
73+
examples:
74+
- name: Pause executing next line of CLI script until the healthbot is successfully created.
75+
text: |-
76+
az healthbot wait --name "samplebotname" --resource-group "healthbotClient" --created
77+
- name: Pause executing next line of CLI script until the healthbot is successfully deleted.
78+
text: |-
79+
az healthbot wait --name "samplebotname" --resource-group "healthbotClient" --deleted
80+
"""

0 commit comments

Comments
 (0)