Skip to content

Commit 80613ca

Browse files
author
SDKAuto
committed
CodeGen from PR 32238 in Azure/azure-rest-api-specs
Merge 716979f11e60d61cadae6cf9ef6bb0ccd80bd161 into cce7b0f87b776c2c8fe4b23020cc05029fc9d723
1 parent 1344888 commit 80613ca

File tree

62 files changed

+17046
-0
lines changed

Some content is hidden

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

62 files changed

+17046
-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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include *.md
2+
include LICENSE
3+
include microsoft/agricultureplatform/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include microsoft/__init__.py
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
3+
# Microsoft Agricultureplatform 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 microsoft-agricultureplatform
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 Microsoft Agricultureplatform instance.
19+
20+
## Contributing
21+
22+
This project welcomes contributions and suggestions. Most contributions require
23+
you to agree to a Contributor License Agreement (CLA) declaring that you have
24+
the right to, and actually do, grant us the rights to use your contribution.
25+
For details, visit https://cla.microsoft.com.
26+
27+
When you submit a pull request, a CLA-bot will automatically determine whether
28+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
29+
comment). Simply follow the instructions provided by the bot. You will only
30+
need to do this once across all repos using our CLA.
31+
32+
This project has adopted the
33+
[Microsoft Open Source Code of Conduct][code_of_conduct]. For more information,
34+
see the Code of Conduct FAQ or contact [email protected] with any
35+
additional questions or comments.
36+
37+
<!-- LINKS -->
38+
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
39+
[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token
40+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials
41+
[azure_identity_pip]: https://pypi.org/project/azure-identity/
42+
[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential
43+
[pip]: https://pypi.org/project/pip/
44+
[azure_sub]: https://azure.microsoft.com/free/
45+
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.AgriculturePlatform",
3+
"CrossLanguageDefinitionId": {
4+
"microsoft.agricultureplatform.models.AuthCredentials": "Microsoft.AgriculturePlatform.AuthCredentials",
5+
"microsoft.agricultureplatform.models.ApiKeyAuthCredentials": "Microsoft.AgriculturePlatform.ApiKeyAuthCredentials",
6+
"microsoft.agricultureplatform.models.Asset": "Microsoft.AgriculturePlatform.Asset",
7+
"microsoft.agricultureplatform.models.Catalog": "Microsoft.AgriculturePlatform.Catalog",
8+
"microsoft.agricultureplatform.models.CatalogCollection": "Microsoft.AgriculturePlatform.CatalogCollection",
9+
"microsoft.agricultureplatform.models.Collection": "Microsoft.AgriculturePlatform.Collection",
10+
"microsoft.agricultureplatform.models.ErrorForLocation": "Microsoft.AgriculturePlatform.ErrorForLocation",
11+
"microsoft.agricultureplatform.models.ErrorResponse": "Microsoft.AgriculturePlatform.ErrorResponse",
12+
"microsoft.agricultureplatform.models.File": "Microsoft.AgriculturePlatform.File",
13+
"microsoft.agricultureplatform.models.GeoJsonObject": "Microsoft.AgriculturePlatform.GeoJsonObject",
14+
"microsoft.agricultureplatform.models.ImageFile": "Microsoft.AgriculturePlatform.ImageFile",
15+
"microsoft.agricultureplatform.models.Item": "Microsoft.AgriculturePlatform.Item",
16+
"microsoft.agricultureplatform.models.ItemListResponse": "Microsoft.AgriculturePlatform.ItemListResponse",
17+
"microsoft.agricultureplatform.models.ItemResponse": "Microsoft.AgriculturePlatform.ItemResponse",
18+
"microsoft.agricultureplatform.models.KeyVaultProperties": "Microsoft.AgriculturePlatform.KeyVaultProperties",
19+
"microsoft.agricultureplatform.models.Link": "Microsoft.AgriculturePlatform.Link",
20+
"microsoft.agricultureplatform.models.Measures": "Microsoft.AgriculturePlatform.Measures",
21+
"microsoft.agricultureplatform.models.MultiPolygon": "Microsoft.AgriculturePlatform.MultiPolygon",
22+
"microsoft.agricultureplatform.models.OauthClientCredentials": "Microsoft.AgriculturePlatform.OauthClientCredentials",
23+
"microsoft.agricultureplatform.models.Point": "Microsoft.AgriculturePlatform.Point",
24+
"microsoft.agricultureplatform.models.Polygon": "Microsoft.AgriculturePlatform.Polygon",
25+
"microsoft.agricultureplatform.models.SamplePartnerRequestBody": "Microsoft.AgriculturePlatform.SamplePartnerRequestBody",
26+
"microsoft.agricultureplatform.models.SamplePartnerResponse": "Microsoft.AgriculturePlatform.SamplePartnerResponse",
27+
"microsoft.agricultureplatform.models.SatelliteData": "Microsoft.AgriculturePlatform.SatelliteData",
28+
"microsoft.agricultureplatform.models.SatelliteFetchData": "Microsoft.AgriculturePlatform.SatelliteFetchData",
29+
"microsoft.agricultureplatform.models.SatelliteFetchResponse": "Microsoft.AgriculturePlatform.SatelliteFetchResponse",
30+
"microsoft.agricultureplatform.models.Schema": "Microsoft.AgriculturePlatform.Schema",
31+
"microsoft.agricultureplatform.models.SearchFeaturesResponse": "Microsoft.AgriculturePlatform.SearchFeaturesResponse",
32+
"microsoft.agricultureplatform.models.StacAsset": "Microsoft.AgriculturePlatform.StacAsset",
33+
"microsoft.agricultureplatform.models.StacItem": "Microsoft.AgriculturePlatform.StacItem",
34+
"microsoft.agricultureplatform.models.StacLink": "Microsoft.AgriculturePlatform.StacLink",
35+
"microsoft.agricultureplatform.models.WeatherData": "Microsoft.AgriculturePlatform.WeatherData",
36+
"microsoft.agricultureplatform.models.WeatherDataErrors": "Microsoft.AgriculturePlatform.WeatherDataErrors",
37+
"microsoft.agricultureplatform.models.WeatherLocation": "Microsoft.AgriculturePlatform.WeatherLocation",
38+
"microsoft.agricultureplatform.models.WeatherLocationData": "Microsoft.AgriculturePlatform.WeatherLocationData",
39+
"microsoft.agricultureplatform.models.WeatherMetadata": "Microsoft.AgriculturePlatform.WeatherMetadata",
40+
"microsoft.agricultureplatform.models.WeatherResponse": "Microsoft.AgriculturePlatform.WeatherResponse",
41+
"microsoft.agricultureplatform.models.RelationshipType": "Microsoft.AgriculturePlatform.RelationshipType",
42+
"microsoft.agricultureplatform.models.DestinationType": "Microsoft.AgriculturePlatform.DestinationType",
43+
"microsoft.agricultureplatform.models.DataFormat": "Microsoft.AgriculturePlatform.DataFormat",
44+
"microsoft.agricultureplatform.models.GeoJsonObjectType": "Microsoft.AgriculturePlatform.GeoJsonObjectType",
45+
"microsoft.agricultureplatform.models.ImageFormat": "Microsoft.AgriculturePlatform.ImageFormat",
46+
"microsoft.agricultureplatform.models.AuthCredentialsKind": "Microsoft.AgriculturePlatform.AuthCredentialsKind",
47+
"microsoft.agricultureplatform.AgriculturePlatformClient.catalogs_operations.list": "Microsoft.AgriculturePlatform.CatalogsOperations.list",
48+
"microsoft.agricultureplatform.AgriculturePlatformClient.catalogs_operations.get": "Microsoft.AgriculturePlatform.CatalogsOperations.get",
49+
"microsoft.agricultureplatform.AgriculturePlatformClient.catalogs_operations.create_or_update": "Microsoft.AgriculturePlatform.CatalogsOperations.createOrUpdate",
50+
"microsoft.agricultureplatform.AgriculturePlatformClient.catalogs_operations.delete": "Microsoft.AgriculturePlatform.CatalogsOperations.delete",
51+
"microsoft.agricultureplatform.AgriculturePlatformClient.collections_operations.list": "Microsoft.AgriculturePlatform.CollectionsOperations.list",
52+
"microsoft.agricultureplatform.AgriculturePlatformClient.collections_operations.get": "Microsoft.AgriculturePlatform.CollectionsOperations.get",
53+
"microsoft.agricultureplatform.AgriculturePlatformClient.collections_operations.create_or_update": "Microsoft.AgriculturePlatform.CollectionsOperations.createOrUpdate",
54+
"microsoft.agricultureplatform.AgriculturePlatformClient.collections_operations.delete": "Microsoft.AgriculturePlatform.CollectionsOperations.delete",
55+
"microsoft.agricultureplatform.AgriculturePlatformClient.file_operations.delete": "Microsoft.AgriculturePlatform.FileOperations.delete",
56+
"microsoft.agricultureplatform.AgriculturePlatformClient.file_operations.download": "Microsoft.AgriculturePlatform.FileOperations.download",
57+
"microsoft.agricultureplatform.AgriculturePlatformClient.file_operations.upload": "Microsoft.AgriculturePlatform.FileOperations.upload",
58+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.create": "Microsoft.AgriculturePlatform.ItemsOperations.create",
59+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.get": "Microsoft.AgriculturePlatform.ItemsOperations.get",
60+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.create_or_update": "Microsoft.AgriculturePlatform.ItemsOperations.createOrUpdate",
61+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.delete": "Microsoft.AgriculturePlatform.ItemsOperations.delete",
62+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.get_all_under_collection": "Microsoft.AgriculturePlatform.ItemsOperations.getAllUnderCollection",
63+
"microsoft.agricultureplatform.AgriculturePlatformClient.items_operations.search_across_collection": "Microsoft.AgriculturePlatform.ItemsOperations.searchAcrossCollection",
64+
"microsoft.agricultureplatform.AgriculturePlatformClient.satellite_operations.fetch_items": "Microsoft.AgriculturePlatform.SatelliteOperations.fetchItems",
65+
"microsoft.agricultureplatform.AgriculturePlatformClient.satellite_operations.search_items": "Microsoft.AgriculturePlatform.SatelliteOperations.searchItems",
66+
"microsoft.agricultureplatform.AgriculturePlatformClient.schemas_operations.list": "Microsoft.AgriculturePlatform.SchemasOperations.list",
67+
"microsoft.agricultureplatform.AgriculturePlatformClient.schemas_operations.get": "Microsoft.AgriculturePlatform.SchemasOperations.get",
68+
"microsoft.agricultureplatform.AgriculturePlatformClient.schemas_operations.create_or_update": "Microsoft.AgriculturePlatform.SchemasOperations.createOrUpdate",
69+
"microsoft.agricultureplatform.AgriculturePlatformClient.schemas_operations.delete": "Microsoft.AgriculturePlatform.SchemasOperations.delete",
70+
"microsoft.agricultureplatform.AgriculturePlatformClient.solutions_operations.cancel_job": "Microsoft.AgriculturePlatform.SolutionsOperations.cancelJob",
71+
"microsoft.agricultureplatform.AgriculturePlatformClient.solutions_operations.create_job": "Microsoft.AgriculturePlatform.SolutionsOperations.createJob",
72+
"microsoft.agricultureplatform.AgriculturePlatformClient.solutions_operations.get_data": "Microsoft.AgriculturePlatform.SolutionsOperations.getData",
73+
"microsoft.agricultureplatform.AgriculturePlatformClient.solutions_operations.get_job": "Microsoft.AgriculturePlatform.SolutionsOperations.getJob",
74+
"microsoft.agricultureplatform.AgriculturePlatformClient.weather_operations.get": "Microsoft.AgriculturePlatform.WeatherOperations.get"
75+
}
76+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-e ../../../tools/azure-sdk-tools
2+
../../core/azure-core
3+
aiohttp
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
import os
10+
11+
from azure.core.credentials import AzureKeyCredential
12+
13+
from microsoft.agricultureplatform import AgriculturePlatformClient
14+
15+
"""
16+
# PREREQUISITES
17+
pip install microsoft-agricultureplatform
18+
# USAGE
19+
python catalogs_delete.py
20+
21+
Before run the sample, please set environment variables AZURE_KEY with real value
22+
which can access your service
23+
"""
24+
25+
26+
def main():
27+
client = AgriculturePlatformClient(
28+
credential=AzureKeyCredential(key=os.getenv("AZURE_KEY")),
29+
host="HOST",
30+
)
31+
32+
client.catalogs_operations.delete(
33+
catalog_id="CATALOG123",
34+
)
35+
36+
37+
# x-ms-original-file: 2024-11-01-preview/Catalogs_Delete.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
import os
10+
11+
from azure.core.credentials import AzureKeyCredential
12+
13+
from microsoft.agricultureplatform import AgriculturePlatformClient
14+
15+
"""
16+
# PREREQUISITES
17+
pip install microsoft-agricultureplatform
18+
# USAGE
19+
python catalogs_get.py
20+
21+
Before run the sample, please set environment variables AZURE_KEY with real value
22+
which can access your service
23+
"""
24+
25+
26+
def main():
27+
client = AgriculturePlatformClient(
28+
credential=AzureKeyCredential(key=os.getenv("AZURE_KEY")),
29+
host="HOST",
30+
)
31+
32+
response = client.catalogs_operations.get(
33+
catalog_id="CATALOG123",
34+
)
35+
print(response)
36+
37+
38+
# x-ms-original-file: 2024-11-01-preview/Catalogs_Get.json
39+
if __name__ == "__main__":
40+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
import os
10+
11+
from azure.core.credentials import AzureKeyCredential
12+
13+
from microsoft.agricultureplatform import AgriculturePlatformClient
14+
15+
"""
16+
# PREREQUISITES
17+
pip install microsoft-agricultureplatform
18+
# USAGE
19+
python catalogs_list.py
20+
21+
Before run the sample, please set environment variables AZURE_KEY with real value
22+
which can access your service
23+
"""
24+
25+
26+
def main():
27+
client = AgriculturePlatformClient(
28+
credential=AzureKeyCredential(key=os.getenv("AZURE_KEY")),
29+
host="HOST",
30+
)
31+
32+
response = client.catalogs_operations.list()
33+
for item in response:
34+
print(item)
35+
36+
37+
# x-ms-original-file: 2024-11-01-preview/Catalogs_List.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
import os
10+
11+
from azure.core.credentials import AzureKeyCredential
12+
13+
from microsoft.agricultureplatform import AgriculturePlatformClient
14+
15+
"""
16+
# PREREQUISITES
17+
pip install microsoft-agricultureplatform
18+
# USAGE
19+
python collections_delete.py
20+
21+
Before run the sample, please set environment variables AZURE_KEY with real value
22+
which can access your service
23+
"""
24+
25+
26+
def main():
27+
client = AgriculturePlatformClient(
28+
credential=AzureKeyCredential(key=os.getenv("AZURE_KEY")),
29+
host="HOST",
30+
)
31+
32+
client.collections_operations.delete(
33+
catalog_id="CATALOG123",
34+
collection_id="COLLECTION123",
35+
)
36+
37+
38+
# x-ms-original-file: 2024-11-01-preview/Collections_Delete.json
39+
if __name__ == "__main__":
40+
main()
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
import os
10+
11+
from azure.core.credentials import AzureKeyCredential
12+
13+
from microsoft.agricultureplatform import AgriculturePlatformClient
14+
15+
"""
16+
# PREREQUISITES
17+
pip install microsoft-agricultureplatform
18+
# USAGE
19+
python collections_get.py
20+
21+
Before run the sample, please set environment variables AZURE_KEY with real value
22+
which can access your service
23+
"""
24+
25+
26+
def main():
27+
client = AgriculturePlatformClient(
28+
credential=AzureKeyCredential(key=os.getenv("AZURE_KEY")),
29+
host="HOST",
30+
)
31+
32+
response = client.collections_operations.get(
33+
catalog_id="CATALOG123",
34+
collection_id="COLLECTION123",
35+
)
36+
print(response)
37+
38+
39+
# x-ms-original-file: 2024-11-01-preview/Collections_Get.json
40+
if __name__ == "__main__":
41+
main()

0 commit comments

Comments
 (0)