Skip to content

Commit b706b8e

Browse files
author
SDKAuto
committed
CodeGen from PR 33052 in Azure/azure-rest-api-specs
Merge 3bd4b3f9b5795960bb1fb40b59d40d42de27fea8 into 7a5a8d753713d3db02d262128749427e98289887
1 parent 23163bc commit b706b8e

38 files changed

+9687
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0b1 (1970-01-01)
4+
5+
- Initial version
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include *.md
2+
include LICENSE
3+
include azure/microsoft/industry/manufacturing/mds/copilot/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/microsoft/__init__.py
8+
include azure/microsoft/industry/__init__.py
9+
include azure/microsoft/industry/manufacturing/__init__.py
10+
include azure/microsoft/industry/manufacturing/mds/__init__.py
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
2+
3+
# Azure Microsoft Industry Manufacturing Mds Copilot client library for Python
4+
<!-- write necessary description of service -->
5+
6+
## Getting started
7+
8+
### Install the package
9+
10+
```bash
11+
python -m pip install azure-microsoft-industry-manufacturing-mds-copilot
12+
```
13+
14+
#### Prequisites
15+
16+
- Python 3.8 or later is required to use this package.
17+
- You need an [Azure subscription][azure_sub] to use this package.
18+
- An existing Azure Microsoft Industry Manufacturing Mds Copilot instance.
19+
#### Create with an Azure Active Directory Credential
20+
To use an [Azure Active Directory (AAD) token credential][authenticate_with_token],
21+
provide an instance of the desired credential type obtained from the
22+
[azure-identity][azure_identity_credentials] library.
23+
24+
To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip]
25+
26+
After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use.
27+
As an example, [DefaultAzureCredential][default_azure_credential] can be used to authenticate the client:
28+
29+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
30+
`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`
31+
32+
Use the returned token credential to authenticate the client:
33+
34+
```python
35+
>>> from azure.microsoft.industry.manufacturing.mds.copilot import CopilotServiceClient
36+
>>> from azure.identity import DefaultAzureCredential
37+
>>> client = CopilotServiceClient(endpoint='<endpoint>', credential=DefaultAzureCredential())
38+
```
39+
40+
## Examples
41+
42+
```python
43+
>>> from azure.microsoft.industry.manufacturing.mds.copilot import CopilotServiceClient
44+
>>> from azure.identity import DefaultAzureCredential
45+
>>> from azure.core.exceptions import HttpResponseError
46+
47+
>>> client = CopilotServiceClient(endpoint='<endpoint>', credential=DefaultAzureCredential())
48+
>>> try:
49+
<!-- write test code here -->
50+
except HttpResponseError as e:
51+
print('service responds error: {}'.format(e.response.json()))
52+
53+
```
54+
55+
## Contributing
56+
57+
This project welcomes contributions and suggestions. Most contributions require
58+
you to agree to a Contributor License Agreement (CLA) declaring that you have
59+
the right to, and actually do, grant us the rights to use your contribution.
60+
For details, visit https://cla.microsoft.com.
61+
62+
When you submit a pull request, a CLA-bot will automatically determine whether
63+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
64+
comment). Simply follow the instructions provided by the bot. You will only
65+
need to do this once across all repos using our CLA.
66+
67+
This project has adopted the
68+
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
69+
see the Code of Conduct FAQ or contact [email protected] with any
70+
additional questions or comments.
71+
72+
<!-- LINKS -->
73+
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
74+
[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token
75+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials
76+
[azure_identity_pip]: https://pypi.org/project/azure-identity/
77+
[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential
78+
[pip]: https://pypi.org/project/pip/
79+
[azure_sub]: https://azure.microsoft.com/free/
80+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"commit": "e556377ce7b5db964a77f5a742bd74edd1c9448b",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/manufacturingdatasolution/ManufacturingDataSolution.Copilot",
5+
"@azure-tools/typespec-python": "0.39.1"
6+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"CrossLanguagePackageId": "MdsSolution.CopilotService",
3+
"CrossLanguageDefinitionId": {
4+
"azure.microsoft.industry.manufacturing.mds.copilot.models.AdministrativeDetails": "MdsSolution.CopilotService.Models.AdministrativeDetails",
5+
"azure.microsoft.industry.manufacturing.mds.copilot.models.Alias": "MdsSolution.CopilotService.Models.Alias",
6+
"azure.microsoft.industry.manufacturing.mds.copilot.models.ContentProperties": "MdsSolution.CopilotService.Models.ContentProperties",
7+
"azure.microsoft.industry.manufacturing.mds.copilot.models.CopilotHealth": "MdsSolution.CopilotService.Models.CopilotHealth",
8+
"azure.microsoft.industry.manufacturing.mds.copilot.models.ExampleQueryRequest": "MdsSolution.CopilotService.Models.ExampleQueryRequest",
9+
"azure.microsoft.industry.manufacturing.mds.copilot.models.GetOperationResultResponse": "MdsSolution.CopilotService.getOperationResult.Response.anonymous",
10+
"azure.microsoft.industry.manufacturing.mds.copilot.models.GetResponse": "MdsSolution.CopilotService.get.Response.anonymous",
11+
"azure.microsoft.industry.manufacturing.mds.copilot.models.Instruction": "MdsSolution.CopilotService.Models.Instruction",
12+
"azure.microsoft.industry.manufacturing.mds.copilot.models.QueryResponse": "MdsSolution.CopilotService.Models.QueryResponse",
13+
"azure.microsoft.industry.manufacturing.mds.copilot.models.Relationships": "MdsSolution.CopilotService.Models.Relationships",
14+
"azure.microsoft.industry.manufacturing.mds.copilot.models.RetrievalProperties": "MdsSolution.CopilotService.Models.RetrievalProperties",
15+
"azure.microsoft.industry.manufacturing.mds.copilot.models.SampleQuery": "MdsSolution.CopilotService.Models.SampleQuery",
16+
"azure.microsoft.industry.manufacturing.mds.copilot.models.SemanticContent": "MdsSolution.CopilotService.Models.SemanticContent",
17+
"azure.microsoft.industry.manufacturing.mds.copilot.models.SubmitFeedbackResponse": "MdsSolution.CopilotService.submitFeedback.Response.anonymous",
18+
"azure.microsoft.industry.manufacturing.mds.copilot.models.UserQueryRequest": "MdsSolution.CopilotService.Models.UserQueryRequest",
19+
"azure.microsoft.industry.manufacturing.mds.copilot.models.InstrustionDomainEnum": "MdsSolution.CopilotService.Models.InstrustionDomainEnum",
20+
"azure.microsoft.industry.manufacturing.mds.copilot.models.InstructionSubDomainEnum": "MdsSolution.CopilotService.Models.InstructionSubDomainEnum",
21+
"azure.microsoft.industry.manufacturing.mds.copilot.models.InstructionCategoryEnum": "MdsSolution.CopilotService.Models.InstructionCategoryEnum",
22+
"azure.microsoft.industry.manufacturing.mds.copilot.models.InstructionLanguageEnum": "MdsSolution.CopilotService.Models.InstructionLanguageEnum",
23+
"azure.microsoft.industry.manufacturing.mds.copilot.models.ResourceState": "MdsSolution.CopilotService.Models.ResourceState",
24+
"azure.microsoft.industry.manufacturing.mds.copilot.models.DataTableFormat": "MdsSolution.CopilotService.Models.DataTableFormat",
25+
"azure.microsoft.industry.manufacturing.mds.copilot.models.Choice": "MdsSolution.CopilotService.Models.Choice",
26+
"azure.microsoft.industry.manufacturing.mds.copilot.models.FeedbackCategory": "MdsSolution.CopilotService.Models.FeedbackCategory",
27+
"azure.microsoft.industry.manufacturing.mds.copilot.models.QueryEndpoint": "MdsSolution.CopilotService.Models.QueryEndpoint",
28+
"azure.microsoft.industry.manufacturing.mds.copilot.models.OperationStatusValue": "MdsSolution.CopilotService.Models.OperationStatusValue",
29+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_service_client.query_execute": "MdsSolution.CopilotService.QueryServiceClient.queryExecute",
30+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_service_client.submit_feedback": "MdsSolution.CopilotService.QueryServiceClient.submitFeedback",
31+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.operation_service_client.get_operation_result": "MdsSolution.CopilotService.OperationServiceClient.getOperationResult",
32+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_example_service_client.get_example": "MdsSolution.CopilotService.QueryExampleServiceClient.getExample",
33+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_example_service_client.list_all_examples": "MdsSolution.CopilotService.QueryExampleServiceClient.listAllExamples",
34+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_example_service_client.create_or_replace": "MdsSolution.CopilotService.QueryExampleServiceClient.createOrReplace",
35+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.query_example_service_client.delete_example": "MdsSolution.CopilotService.QueryExampleServiceClient.deleteExample",
36+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.aliases_service_client.get": "MdsSolution.CopilotService.AliasesServiceClient.get",
37+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.aliases_service_client.begin_create_or_replace": "MdsSolution.CopilotService.AliasesServiceClient.createOrReplace",
38+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.aliases_service_client.delete": "MdsSolution.CopilotService.AliasesServiceClient.delete",
39+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.aliases_service_client.list": "MdsSolution.CopilotService.AliasesServiceClient.list",
40+
"azure.microsoft.industry.manufacturing.mds.copilot.CopilotServiceClient.heath_service_client.get_service_health": "MdsSolution.CopilotService.HeathServiceClient.getServiceHealth"
41+
}
42+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

0 commit comments

Comments
 (0)